diff options
| author | rorka <rorka@rorka.my.domain> | 2026-06-23 20:38:02 +0300 |
|---|---|---|
| committer | rorka <rorka@rorka.my.domain> | 2026-06-23 20:38:02 +0300 |
| commit | 3c2bec16cf37437759004bdf240fa6c85bc9e428 (patch) | |
| tree | 42c760a8dcd878cfee91c41958874c23b8bc7889 /src/progress.rs | |
| parent | f726a6920d85f149efeae9ca1624138e9e374938 (diff) | |
| download | ror-3c2bec16cf37437759004bdf240fa6c85bc9e428.tar.gz ror-3c2bec16cf37437759004bdf240fa6c85bc9e428.zip | |
refactor: optimize package extraction and harden path traversal protection
Diffstat (limited to 'src/progress.rs')
| -rwxr-xr-x[-rw-r--r--] | src/progress.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/progress.rs b/src/progress.rs index f6f2227..bd9c806 100644..100755 --- a/src/progress.rs +++ b/src/progress.rs @@ -1,3 +1,4 @@ +// src/progress.rs use std::io::{self, Write}; pub struct ProgressBar { @@ -17,14 +18,13 @@ impl ProgressBar { } } - pub fn inc(&mut self, msg: &str) { self.current += 1; self.message = msg.to_string(); self.render(); } - fn render(&self) { + pub fn render(&self) { let filled = if self.total == 0 { 0 } else { |