Skip to content

Commit d011c3e

Browse files
committed
fix: correct typos spotted by me
- update default config comments to use “milliseconds” - rename Error::Hexidecimal variant to Error::Hexadecimal and adjust messaging - tidy comments in DBus handling for “more so”, “overridden”, and “synchronous” Author: rezky_nightky <[email protected]> Timestamp: 2025-12-01T17:31:58Z Repository: wired-notify Branch: master Signing: GPG (989AF9F0) Performance: 4 files, +13/-13 lines
1 parent 6a96aa2 commit d011c3e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/bus/dbus.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl OrgFreedesktopNotifications for Notify {
8383
// is effectively assigning its own id, which may interfere with ours. Not sure how mmuch I can
8484
// do about this.
8585
let id = if replaces_id == 0 {
86-
// Grab an ID atomically. This is moreso to allow global access to `ID_COUNT`, but I'm
86+
// Grab an ID atomically. This is more so to allow global access to `ID_COUNT`, but I'm
8787
// also not sure if `notify` is called in a single-threaded way, so it's best to be safe.
8888
fetch_id()
8989
} else {
@@ -443,13 +443,13 @@ impl Notification {
443443
}
444444

445445
// What's the difference between tag and note?
446-
// A tag defines a certain type of notification, and allows it to be easily overriden using that tag.
446+
// A tag defines a certain type of notification, and allows it to be easily overridden using that tag.
447447
// A note is supplemental data passed to the notification. It's purely used for render
448448
// criteria stuff right now.
449449
let mut tag = arg::prop_cast::<String>(&hints, "wired-tag").cloned();
450450
let note = arg::prop_cast::<String>(&hints, "wired-note").cloned();
451451

452-
// We convert Canonical's special synchonous tag as if it was one of our own. The
452+
// We convert Canonical's special synchronous tag as if it was one of our own. The
453453
// functionality is the same. A decent overview: https://gitlab.freedesktop.org/xdg/xdg-specs/-/issues/77
454454
let canonical_synchronous = arg::prop_cast::<String>(&hints, "x-canonical-private-synchronous").cloned();
455455

src/config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum Error {
4141
// Validation error.
4242
Validate(&'static str),
4343
// Bad hex string error.
44-
Hexidecimal(&'static str),
44+
Hexadecimal(&'static str),
4545
// IO error reading file.
4646
Io(io::Error),
4747
// Deserialization error.
@@ -55,7 +55,7 @@ impl std::error::Error for Error {
5555
match self {
5656
Error::NotFound => None,
5757
Error::Validate(_) => None,
58-
Error::Hexidecimal(_) => None,
58+
Error::Hexadecimal(_) => None,
5959
Error::Io(err) => err.source(),
6060
Error::Ron(err) => err.source(),
6161
Error::Watch(err) => err.source(),
@@ -68,8 +68,8 @@ impl Display for Error {
6868
match self {
6969
Error::NotFound => write!(f, "No config found"),
7070
Error::Validate(problem) => write!(f, "Error validating config file: {}", problem),
71-
Error::Hexidecimal(problem) => {
72-
write!(f, "Error parsing hexidecimal string: {}", problem)
71+
Error::Hexadecimal(problem) => {
72+
write!(f, "Error parsing hexadecimal string: {}", problem)
7373
}
7474
Error::Io(err) => write!(f, "Error reading config file: {}", err),
7575
Error::Ron(err) => write!(f, "Problem with config file: {}", err),
@@ -272,7 +272,7 @@ impl Config {
272272
}
273273
}
274274

275-
// Get mutable refernce to global config variable.
275+
// Get mutable reference to global config variable.
276276
pub fn get_mut() -> &'static mut Config {
277277
unsafe {
278278
assert!(CONFIG.is_some());
@@ -592,7 +592,7 @@ impl Color {
592592
let dec = u32::from_str_radix(sanitized, 16);
593593
let dec = match dec {
594594
Ok(d) => d,
595-
Err(_) => return Err(Error::Hexidecimal("Invalid hexidecimal string.")),
595+
Err(_) => return Err(Error::Hexadecimal("Invalid hexadecimal string.")),
596596
};
597597

598598
// If we have 8 chars, then this is hex string includes alpha, if we have 6, then it
@@ -611,7 +611,7 @@ impl Color {
611611
let b = (dec & 0xff) as f64 / 255.0;
612612
Ok(Color::from_rgba(r, g, b, a))
613613
} else {
614-
Err(Error::Hexidecimal("Incorrect hexidecimal string length."))
614+
Err(Error::Hexadecimal("Incorrect hexadecimal string length."))
615615
}
616616
}
617617
}
@@ -648,7 +648,7 @@ impl<'de> Deserialize<'de> for Color {
648648
#[allow(clippy::or_fun_call)]
649649
return Color::from_hex(&hex).or(Err(de::Error::invalid_value(
650650
Unexpected::Str(&hex),
651-
&"a valid hexidecimal string",
651+
&"a valid hexadecimal string",
652652
)));
653653
} else if let (Some(r), Some(g), Some(b), Some(a)) = (col.r, col.g, col.b, col.a) {
654654
Ok(Color::from_rgba(r, g, b, a))

wired.ron

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// A value of 0 means that there is no limit.
55
max_notifications: 0,
66

7-
// The default timeout, in miliseconds, for notifications that don't have an initial timeout set.
7+
// The default timeout, in milliseconds, for notifications that don't have an initial timeout set.
88
// 1000ms = 1s.
99
timeout: 10000,
1010

wired_multilayout.ron

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// A value of 0 means that there is no limit.
44
max_notifications: 0,
55

6-
// The default timeout, in miliseconds, for notifications that don't have an initial timeout set.
6+
// The default timeout, in milliseconds, for notifications that don't have an initial timeout set.
77
// 1000ms = 1s.
88
timeout: 10000,
99

0 commit comments

Comments
 (0)