File: 2001_bytesize.patch

package info (click to toggle)
rust-wasmtime 36.0.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 60,576 kB
  • sloc: cpp: 5,670; ansic: 4,079; sh: 636; javascript: 608; asm: 110; ml: 96; makefile: 61; python: 12
file content (29 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: use older major version of crate bytesize
Author: Jonas Smedegaard <dr@jones.dk>
Bug-Debian: https://bugs.debian.org/1111400
Forwarded: not-needed
Last-Update: 2026-02-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -110,7 +110,7 @@
 serde = { workspace = true }
 serde_json = { workspace = true }
 walkdir = { workspace = true }
-bytesize = "2.0.1"
+bytesize = "1.3.0"
 wit-component = { workspace = true }
 cranelift-filetests = { workspace = true }
 cranelift-codegen = { workspace = true, features = ["disas", "trace-log", "timing"] }
--- a/examples/mpk.rs
+++ b/examples/mpk.rs
@@ -120,7 +120,7 @@
 impl Pool {
     /// Print a human-readable, tab-separated description of this structure.
     fn to_string(&self) -> String {
-        let human_size = ByteSize::b(self.mapped_bytes as u64).display().si();
+         let human_size = ByteSize::b(self.mapped_bytes as u64).to_string_as(true);
         format!(
             "{} memory slots\t{} reserved",
             self.num_memories, human_size