diff options
| author | Fuwn <[email protected]> | 2025-05-27 16:16:35 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-27 16:16:35 +0000 |
| commit | 884aa53553e4a811dc269d60fd6fc59e837390d3 (patch) | |
| tree | 53718aa956dd7623465a9dd2fa142d024d4f9726 /src/meta.rs | |
| parent | ci(ga): bump rustc (diff) | |
| download | germ-884aa53553e4a811dc269d60fd6fc59e837390d3.tar.xz germ-884aa53553e4a811dc269d60fd6fc59e837390d3.zip | |
refactor: Use latest best practices and formatting
Diffstat (limited to 'src/meta.rs')
| -rw-r--r-- | src/meta.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/meta.rs b/src/meta.rs index dca963a..95ff4f1 100644 --- a/src/meta.rs +++ b/src/meta.rs @@ -100,6 +100,7 @@ impl Meta { /// "text/gemini", /// ); /// ``` + #[allow(clippy::missing_const_for_fn)] #[must_use] pub fn mime(&self) -> Cow<'_, str> { Cow::Borrowed(&self.mime) } @@ -112,7 +113,7 @@ impl Meta { /// /// *meta.mime_mut() = "text/gemini".to_string(); /// ``` - pub fn mime_mut(&mut self) -> &mut String { &mut self.mime } + pub const fn mime_mut(&mut self) -> &mut String { &mut self.mime } /// Obtain non-mutable access to the parameters of the `Meta` /// @@ -144,7 +145,7 @@ impl Meta { /// /// *meta.parameters_mut() = parameters; /// ``` - pub fn parameters_mut(&mut self) -> &mut HashMap<String, String> { + pub const fn parameters_mut(&mut self) -> &mut HashMap<String, String> { &mut self.parameters } } |