Skip to content
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

运行 readme_example 报错 #2

Open
jonsen opened this issue Dec 5, 2023 · 1 comment
Open

运行 readme_example 报错 #2

jonsen opened this issue Dec 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jonsen
Copy link

jonsen commented Dec 5, 2023

系统 : macOS 13.6.2
Rustc 1.74.0

执行cargo run来测试时,报如下错误:

$ RUST_BACKTRACE=1 cargo run
warning: unused import: `Instant`
 --> src/extensions/speed_tracker.rs:2:27
  |
2 | use std::time::{Duration, Instant};
  |                           ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: variable does not need to be mutable
  --> src/extensions/speed_tracker.rs:90:13
   |
90 |         let mut downloaded_len_receiver = self.downloaded_len_receiver.clone();
   |             ----^^^^^^^^^^^^^^^^^^^^^^^
   |             |
   |             help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: `http-downloader` (lib) generated 2 warnings (run `cargo fix --lib -p http-downloader` to apply 2 suggestions)
   Compiling readme_example v0.1.0 (/opt/www/workspace/github/http-downloader/examples/readme_example)
    Finished dev [unoptimized + debuginfo] target(s) in 1.23s
     Running `/opt/www/workspace/github/http-downloader/target/debug/readme_example`
2023-12-05T04:53:12.170928Z  INFO readme_example: Prepare download,准备下载
2023-12-05T04:53:12.171332Z  INFO http_downloader::extensions::status_tracker: Status changed Pending(Starting)
2023-12-05T04:53:12.171419Z  INFO http_downloader::extensions::status_tracker: Status changed Pending(Initializing)
2023-12-05T04:53:12.171658Z  INFO readme_example: Start downloading until the end,开始下载直到结束
2023-12-05T04:53:12.523279Z  INFO readme_example: Total size: 452.70 Mb
2023-12-05T04:53:12.523468Z  INFO readme_example: Download Progress: 0 %,0/474694696
2023-12-05T04:53:12.526035Z  INFO http_downloader::extensions::status_tracker: Status changed Running
thread 'main' panicked at src/chunk_item.rs:177:17:
assertion `left == right` failed
  left: 605
 right: 10485760
stack backtrace:
   0: rust_begin_unwind
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:270:5
   4: http_downloader::chunk_item::ChunkItem::download_chunk::{{closure}}::{{closure}}
             at /opt/www/workspace/github/http-downloader/src/chunk_item.rs:177:17
   5: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
@ycysdf
Copy link
Owner

ycysdf commented Feb 17, 2024

抱歉,一直没看到你的 issue。 我这边测试没法复现的你的问题。这个错误是一直会出现? 尝试换一个下载链接是否还会复现这个错误?

@ycysdf ycysdf added the bug Something isn't working label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants