Skip to content

Commit

Permalink
fix typos (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangkirin authored Dec 26, 2023
1 parent d9e50f0 commit 7fcdbe4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/cloud/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub trait CloudStorage {
fn upload_folder(&self, folder: &str, bucket: &str) -> FreightResult;
}

// this method is used to handle 'uplaod' subcommand for uplaod all files to obs server
// this method is used to handle 'upload' subcommand for upload all files to obs server
pub fn upload_with_pool(
path: PathBuf,
thread_pool: Arc<ThreadPool>,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/crates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! Arguments:
//! - __init__: Whether to download all the crates files for initialization.
//! - __upload__: Whether to upload single file to s3 after download success.
//! - __bucket__: set the s3 bucket you want to upload files to, you must provide this param befor uplaod.
//! - __bucket__: set the s3 bucket you want to upload files to, you must provide this param before upload.
//! - __delete-after-upload__: This optional parameter will be used to delete files after upload.
//!
//! # upload subcommand
Expand Down Expand Up @@ -80,7 +80,7 @@ pub fn cli() -> clap::Command {
)
.subcommand(subcommand("download")
.arg(flag("init", "Start init download of crates file, this will traverse all index for full download"))
.arg(flag("fix", "Hanlde the crates file that download failed, this opetion will traverse error log"))
.arg(flag("fix", "Handle the crates file that download failed, this opetion will traverse error log"))
.arg(arg!(--"name" <VALUE> "only fix the crates you specified, this command will try to re-download the crates"))
.arg(flag("upload", "upload every crate file after download"))
.arg(arg!(-b --"bucket" <VALUE> "set the s3 bucket name you want to upload files"))
Expand Down
6 changes: 3 additions & 3 deletions src/handler/crates_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pub fn fix_download(opts: &CratesOptions) -> FreightResult {
tracing::info!("handle success: {}-{}", &name, &vers);
} else {
// skipping visited
tracing::info!("skip different verion of same crates: {}-{}", &name, &vers);
tracing::info!("skip different version of same crates: {}-{}", &name, &vers);
}
}
}
Expand Down Expand Up @@ -371,8 +371,8 @@ pub fn download_crates_with_log(
.replace(opts.crates_path.to_str().unwrap(), "")
);
tracing::info!("s3_path: {}, {}", s3_path, opts.delete_after_upload);
let uploded = s3.upload_file(path, &s3_path, &opts.bucket_name);
if uploded.is_ok() && opts.delete_after_upload {
let uploaded = s3.upload_file(path, &s3_path, &opts.bucket_name);
if uploaded.is_ok() && opts.delete_after_upload {
fs::remove_file(path).unwrap();
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/server/file_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ mod filters {
.and(with_work_dir(git_work_dir.to_owned()))
.and_then(
|_tail, method, body, content_type, _query, work_dir| async move {
let git_protocal = GitCommand::default();
git_protocal
let git_protocol = GitCommand::default();
git_protocol
.git_upload_pack(body, work_dir, method, content_type)
.await
},
Expand All @@ -254,8 +254,8 @@ mod filters {
.and(warp::body::aggregate())
.and(with_work_dir(git_work_dir))
.and_then(|body, work_dir| async move {
let git_protocal = GitCommand::default();
git_protocal.git_info_refs(body, work_dir).await
let git_protocol = GitCommand::default();
git_protocol.git_info_refs(body, work_dir).await
});

warp::path("crates.io-index").and(git_upload_pack.or(git_info_refs))
Expand Down
2 changes: 1 addition & 1 deletion src/server/git_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct GitCommand {}
/// - [conduit-git-http-backend][<https://github.com/conduit-rust/conduit-git-http-backend/blob/master/src/lib.rs>].
///
///
/// hanlde request from git client
/// handle request from git client
impl GitCommand {
pub async fn git_info_refs(
&self,
Expand Down

0 comments on commit 7fcdbe4

Please sign in to comment.