Skip to content

Commit 9db9c03

Browse files
committed
Tweak the default value displayed in the CLI help
1 parent 182e364 commit 9db9c03

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

server/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use std::{
2323

2424
use bytesize::ByteSize;
2525
use clap::Parser;
26-
use matrix_http_rendezvous::{DEFAULT_MAX_BYTES, DEFAULT_MAX_ENTRIES, DEFAULT_TTL};
26+
use matrix_http_rendezvous::{DEFAULT_MAX_BYTES_STR, DEFAULT_MAX_ENTRIES, DEFAULT_TTL};
2727

2828
#[derive(Parser)]
2929
struct Options {
@@ -48,7 +48,7 @@ struct Options {
4848
capacity: usize,
4949

5050
/// Maximum payload size, in bytes
51-
#[arg(short, long, default_value_t = ByteSize(DEFAULT_MAX_BYTES as u64))]
51+
#[arg(short, long, default_value = DEFAULT_MAX_BYTES_STR)]
5252
max_bytes: ByteSize,
5353

5454
/// Set this flag to test how much memory the server might use with a

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pub const DEFAULT_MAX_ENTRIES: usize = 10_000;
3232
/// Default max size of each entry
3333
pub const DEFAULT_MAX_BYTES: usize = 4 * 1024;
3434

35+
#[doc(hidden)]
36+
pub const DEFAULT_MAX_BYTES_STR: &str = "4KiB";
37+
3538
pub use self::{
3639
handlers::router,
3740
sessions::{Session, Sessions},

0 commit comments

Comments
 (0)