parent
699896f335
commit
7eb15b33be
89 changed files with 216 additions and 153 deletions
@ -0,0 +1,16 @@ |
|||||||
|
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. |
||||||
|
# For additional information regarding the format and rule options, please see: |
||||||
|
# https://github.com/browserslist/browserslist#queries |
||||||
|
|
||||||
|
# For the full list of supported browsers by the Angular framework, please see: |
||||||
|
# https://angular.io/guide/browser-support |
||||||
|
|
||||||
|
# You can see what browsers were selected by your queries by running: |
||||||
|
# npx browserslist |
||||||
|
|
||||||
|
last 1 Chrome version |
||||||
|
last 1 Firefox version |
||||||
|
last 2 Edge major versions |
||||||
|
last 2 Safari major versions |
||||||
|
last 2 iOS major versions |
||||||
|
Firefox ESR |
@ -0,0 +1,16 @@ |
|||||||
|
# Editor configuration, see https://editorconfig.org |
||||||
|
root = true |
||||||
|
|
||||||
|
[*] |
||||||
|
charset = utf-8 |
||||||
|
indent_style = space |
||||||
|
indent_size = 2 |
||||||
|
insert_final_newline = true |
||||||
|
trim_trailing_whitespace = true |
||||||
|
|
||||||
|
[*.ts] |
||||||
|
quote_type = single |
||||||
|
|
||||||
|
[*.md] |
||||||
|
max_line_length = off |
||||||
|
trim_trailing_whitespace = false |
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
@ -1,6 +1,6 @@ |
|||||||
use std::fmt::Debug; |
use std::fmt::Debug; |
||||||
|
|
||||||
use crate::utils::OneOrVec; |
use crate::misc::OneOrVec; |
||||||
use anyhow::Error; |
use anyhow::Error; |
||||||
|
|
||||||
pub struct CombinedResult<T, E: Debug = Error> { |
pub struct CombinedResult<T, E: Debug = Error> { |
@ -1,20 +0,0 @@ |
|||||||
pub mod combined_result; |
|
||||||
pub mod conv; |
|
||||||
pub mod misc; |
|
||||||
pub mod platform; |
|
||||||
pub mod proc_output; |
|
||||||
pub mod storage; |
|
||||||
pub mod tempfile; |
|
||||||
#[cfg(unix)] |
|
||||||
pub mod unix; |
|
||||||
|
|
||||||
pub use combined_result::*; |
|
||||||
pub use conv::*; |
|
||||||
pub use misc::*; |
|
||||||
pub use platform::*; |
|
||||||
pub use proc_output::*; |
|
||||||
pub use storage::*; |
|
||||||
pub use tempfile::*; |
|
||||||
|
|
||||||
#[cfg(unix)] |
|
||||||
pub use unix::*; |
|
@ -1,40 +0,0 @@ |
|||||||
use crate::{messaging::AsMsg, utils::OneOrVec}; |
|
||||||
use serde::{Deserialize, Serialize}; |
|
||||||
use std::fmt::{self, Display, Formatter}; |
|
||||||
use std::ops::{Deref, DerefMut}; |
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone, Default)] |
|
||||||
pub struct VecDisplay<T: AsMsg + Display>(pub Vec<T>); |
|
||||||
|
|
||||||
impl<T: AsMsg + Display> VecDisplay<T> { |
|
||||||
pub fn new(inner: impl OneOrVec<T>) -> Self { |
|
||||||
VecDisplay(inner.into_vec()) |
|
||||||
} |
|
||||||
|
|
||||||
pub fn into_builtin_vec(self) -> Vec<T> { |
|
||||||
self.0 |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
impl<T: AsMsg + Display> Deref for VecDisplay<T> { |
|
||||||
type Target = Vec<T>; |
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target { |
|
||||||
&self.0 |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
impl<T: AsMsg + Display> DerefMut for VecDisplay<T> { |
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target { |
|
||||||
&mut self.0 |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
impl<T: AsMsg + Display> Display for VecDisplay<T> { |
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { |
|
||||||
for (i, itm) in self.0.iter().enumerate() { |
|
||||||
writeln!(f, "### {}:\n{}\n", i, itm)?; |
|
||||||
} |
|
||||||
Ok(()) |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue