Skip to content

Commit

Permalink
Fix lint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
grtcdr committed Feb 1, 2025
1 parent 6f97f0a commit fd9fa26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/openwrt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ impl MemoryReadout for OpenWrtMemoryReadout {
}

fn swap_total(&self) -> Result<u64, ReadoutError> {
return Err(ReadoutError::NotImplemented);
Err(ReadoutError::NotImplemented)
}

fn swap_free(&self) -> Result<u64, ReadoutError> {
return Err(ReadoutError::NotImplemented);
Err(ReadoutError::NotImplemented)
}

fn swap_used(&self) -> Result<u64, ReadoutError> {
return Err(ReadoutError::NotImplemented);
Err(ReadoutError::NotImplemented)
}
}

Expand Down
20 changes: 8 additions & 12 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,18 +568,14 @@ pub trait GeneralReadout {
/// _e.g._ `kitty`
fn terminal(&self) -> Result<String, ReadoutError>;

/**
This function should return the currently running shell depending on the `_shorthand` value.
- If `_shorthand` is `ShellFormat::Relative` the basename of the shell will be returned.
_e.g._ bash, zsh, etc.
- If `_shorthand` is `ShellFormat::Absolute` the absolute path of the shell will be returned.
_e.g._ /bin/bash, /bin/zsh, etc.
*/

/// This function should return the currently running shell depending on the `_shorthand`
/// value, for example: /bin/bash, /bin/zsh, etc.
///
/// - If `_shorthand` is `ShellFormat::Relative` the basename of the shell will be returned,
/// _e.g._ bash, zsh, etc.
///
/// - If `_shorthand` is `ShellFormat::Absolute` the absolute path of the shell will be
/// returned.
fn shell(&self, _shorthand: ShellFormat, kind: ShellKind) -> Result<String, ReadoutError>;

/// This function should return the model name of the CPU \
Expand Down

0 comments on commit fd9fa26

Please sign in to comment.