workspace: move crates under crates
This commit is contained in:
parent
0016bc8cf0
commit
6393fdf3c0
354 changed files with 102 additions and 102 deletions
38
crates/bugs/src/lib.rs
Normal file
38
crates/bugs/src/lib.rs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
use {ahash::AHashMap, std::sync::LazyLock};
|
||||
|
||||
static BUGS: LazyLock<AHashMap<&'static str, Bugs>> = LazyLock::new(|| {
|
||||
let mut map = AHashMap::new();
|
||||
map.insert(
|
||||
"chromium",
|
||||
Bugs {
|
||||
respect_min_max_size: true,
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
map.insert(
|
||||
"Alacritty",
|
||||
Bugs {
|
||||
min_width: Some(100),
|
||||
min_height: Some(100),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
map
|
||||
});
|
||||
|
||||
pub fn get(app_id: &str) -> &'static Bugs {
|
||||
BUGS.get(app_id).unwrap_or(&NONE)
|
||||
}
|
||||
|
||||
pub static NONE: Bugs = Bugs {
|
||||
respect_min_max_size: false,
|
||||
min_width: None,
|
||||
min_height: None,
|
||||
};
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Bugs {
|
||||
pub respect_min_max_size: bool,
|
||||
pub min_width: Option<i32>,
|
||||
pub min_height: Option<i32>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue