Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jujulego committed Jun 9, 2024
1 parent 1f5a32e commit d384ad2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/ring-cli/src/js/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn handle_command(args: &ArgMatches) -> Result<()> {
for workspace in project.list_workspaces()? {
println!(" - {workspace}");
}
} else if let None = JsProject::search_from(&project_dir)? {
} else {
warn!("Project root not found");
}

Expand Down
9 changes: 2 additions & 7 deletions crates/ring-js-project/src/package_manager.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
use std::fmt::{Display, Formatter};

#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)]
pub enum PackageManager {
#[default]
NPM,
Yarn
}

impl Default for PackageManager {
fn default() -> Self {
PackageManager::NPM
}
}

impl Display for PackageManager {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down
4 changes: 2 additions & 2 deletions crates/ring-js-project/src/project.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::{Context, Result};
use std::path::{Path, PathBuf};
use std::path::Path;
use glob::glob;
use tracing::{debug, trace};
use crate::constants::{LOCKFILES, MANIFEST};
Expand Down Expand Up @@ -98,6 +98,6 @@ impl JsProject {
}

pub fn get_root(&self) -> &Path {
&self.main_workspace.get_root()
self.main_workspace.get_root()
}
}

0 comments on commit d384ad2

Please sign in to comment.