Skip to content

Commit 0cfc3e6

Browse files
committed
update dependency
1 parent 704d7fb commit 0cfc3e6

File tree

5 files changed

+37
-30
lines changed

5 files changed

+37
-30
lines changed

.github/workflows/qiniu-upload.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Run lint
19+
run: cargo clippy
20+
- name: Build
21+
run: cargo build --release --locked

Cargo.lock

Lines changed: 11 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "qiniu-upload-util"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55
description = "A CLI to upload file to qiniu Kodo"
66
authors = ["linghaihui <75124771@qq.com>"]

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PLATFORMS:=x86_64-apple-darwin x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-apple-darwin
2-
VERSION:=0.1.0
2+
VERSION:=0.1.1
33
CLI:=qiniu-upload-util
44
HOST_TRIPLE := $(shell rustc -vV | grep 'host:' | awk '{print $$2}')
55
SHELLS:=fish zsh bash elvish
@@ -26,13 +26,15 @@ artifacts:all completions
2626
mkdir /tmp/$(CLI); \
2727
cp target/release/$(CLI) /tmp/$(CLI); \
2828
cp -R completions /tmp/$(CLI); \
29+
cp README.md /tmp/$(CLI); \
2930
tar zcvf $(CLI)_$$platform.tar.gz -C /tmp $(CLI); \
3031
rm -rf /tmp/$(CLI); \
3132
else \
3233
chmod +x target/$$platform/release/$(CLI); \
3334
mkdir /tmp/$(CLI); \
3435
cp target/$$platform/release/$(CLI) /tmp/$(CLI); \
3536
cp -R completions /tmp/$(CLI); \
37+
cp README.md /tmp/$(CLI); \
3638
tar zcvf $(CLI)_$$platform.tar.gz -C /tmp $(CLI); \
3739
rm -rf /tmp/$(CLI); \
3840
fi; \

src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ pub async fn upload_to_qiniu<R: AsyncRead + Send + Sync + 'static + std::marker:
2424
part_size: Option<usize>,
2525
threads: Option<u8>,
2626
) -> Result<()> {
27-
let qiniu = QiniuUploader::new(
28-
access_key.to_string(),
29-
secret_key.to_string(),
30-
bucket_name.to_string(),
31-
region,
32-
false,
33-
);
27+
let qiniu = QiniuUploader::new(access_key, secret_key, bucket_name, region, false);
3428
qiniu
3529
.part_upload_file(object_name, reader, file_size, part_size, threads, None)
3630
.await?;

0 commit comments

Comments
 (0)