diff options
author | 2024-04-13 21:24:12 +0200 | |
---|---|---|
committer | 2024-04-13 21:24:12 +0200 | |
commit | 65282048aefecda06f937ed670755b64b19ce9b1 (patch) | |
tree | 1a026ad96955820ab72b02dba79c3c3b8662cacd /src/error.rs | |
parent | 5af8a69942aeed85b5cd2bd84cb5f33169834690 (diff) |
⬆️ (Cargo.toml): Bump lightstreamer-client version from 0.1.8 to 0.1.9
✨ (Cargo.toml): Add colored dependency to enhance console output
📝 (README.md): Overhaul documentation to provide comprehensive details about the project, its features, usage, and contribution guidelines
💡 (client_listener.rs, client_message_listener.rs): Add newline at end of file to adhere to POSIX standards
♻️ (connection_options.rs): Refactor code to improve readability and maintainability
🐛 (connection_options.rs): Rename 'reduce_head' to '_reduce_head' to indicate unused variable
♻️ (error.rs): Reorder imports and adjust formatting for consistency
♻️ (item_update.rs): Refactor code to improve readability and maintainability
♻️ (lib.rs): Reorder module imports for better organization
♻️ (ls_client.rs): Refactor code to improve readability and maintainability
💡 (main.rs): Update print statements to use colored output for changed fields
🐛 (main.rs): Fix import order to follow Rust's idiomatic style
🐛 (proxy.rs, subscription.rs, subscription_listener.rs): Add newline at end of file to follow POSIX standard
♻️ (subscription.rs, subscription_listener.rs): Refactor code to improve readability and maintainability
📝 (util.rs): Add newline at end of file to adhere to POSIX standards
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/error.rs b/src/error.rs index cd1d7c2..33c6ff8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,5 +1,5 @@ -use std::fmt; use std::error::Error; +use std::fmt; #[derive(Debug)] pub struct IllegalArgumentException(String); @@ -24,18 +24,20 @@ impl Error for IllegalArgumentException { #[derive(Debug)] pub struct IllegalStateException { - details: String + details: String, } impl IllegalStateException { pub fn new(msg: &str) -> IllegalStateException { - IllegalStateException{details: msg.to_string()} + IllegalStateException { + details: msg.to_string(), + } } } impl fmt::Display for IllegalStateException { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f,"{}",self.details) + write!(f, "{}", self.details) } } @@ -43,4 +45,4 @@ impl Error for IllegalStateException { fn description(&self) -> &str { &self.details } -}
\ No newline at end of file +} |