Skip to content

Commit

Permalink
style: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Mar 9, 2023
1 parent 1aec736 commit 26cc417
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/meta/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ mod test {
Command::new("touch")
.arg("-t")
.arg(date.format("%Y%m%d%H%M.%S").to_string())
.arg(&path)
.arg(path)
.status()
}

Expand Down
2 changes: 1 addition & 1 deletion src/meta/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl Name {
// HyperlinkOption::Auto gets converted to None or Always in core.rs based on tty_available
match std::fs::canonicalize(&self.path) {
Ok(rp) => {
if let Ok(url) = Url::from_file_path(&rp) {
if let Ok(url) = Url::from_file_path(rp) {
// Crossterm does not support hyperlinks as of now
// https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
format!("\x1B]8;;{}\x1B\x5C{}\x1B]8;;\x1B\x5C", url, name)
Expand Down
2 changes: 1 addition & 1 deletion src/meta/symlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct SymLink {
impl From<&Path> for SymLink {
fn from(path: &Path) -> Self {
if let Ok(target) = read_link(path) {
if target.is_absolute() || path.parent() == None {
if target.is_absolute() || path.parent().is_none() {
return Self {
valid: target.exists(),
target: Some(
Expand Down

0 comments on commit 26cc417

Please sign in to comment.