Skip to content

[scorpio]:fix clippy #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scorpio/doc/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
runner = 'sudo -E'

# dependencies
sudo apt install libfuse-dev
sudo apt install libfuse-dev
sudo apt install librust-openssl-dev
6 changes: 3 additions & 3 deletions scorpio/src/manager/diff.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{ffi::CString, fs};
use std::path::Path;
use libc::{self, stat, S_IFCHR};
use libc::{self, stat};
use mercury::hash::SHA1;

fn collect_paths<P: AsRef<Path>>(path: P) -> Vec<String> {
Expand Down Expand Up @@ -36,10 +36,10 @@ fn is_whiteout_inode(path: &String) -> bool {

false
}

#[allow(unused)]
fn diff(lower: String, upper:String){
let upper_changes = collect_paths(&lower);
let root_len = lower.len();
let _root_len = lower.len();
for node in upper_changes {
if is_whiteout_inode(&node){
// delte a bolb from a tree .
Expand Down
2 changes: 1 addition & 1 deletion scorpio/src/manager/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use serde::{Deserialize, Serialize};
use std::fs;
use toml;

mod diff;
#[derive(Serialize,Deserialize)]
Expand All @@ -14,6 +13,7 @@ struct WorkDir{
path:String,
hash:String,
}
#[allow(unused)]
impl ScorpioManager {
fn from_toml(file_path: &str) -> Result<Self, Box<dyn std::error::Error>> {
let content = fs::read_to_string(file_path)?;
Expand Down
Loading