File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use std::{
23
23
24
24
use bytesize:: ByteSize ;
25
25
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 } ;
27
27
28
28
#[ derive( Parser ) ]
29
29
struct Options {
@@ -48,7 +48,7 @@ struct Options {
48
48
capacity : usize ,
49
49
50
50
/// 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 ) ]
52
52
max_bytes : ByteSize ,
53
53
54
54
/// Set this flag to test how much memory the server might use with a
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ pub const DEFAULT_MAX_ENTRIES: usize = 10_000;
32
32
/// Default max size of each entry
33
33
pub const DEFAULT_MAX_BYTES : usize = 4 * 1024 ;
34
34
35
+ #[ doc( hidden) ]
36
+ pub const DEFAULT_MAX_BYTES_STR : & str = "4KiB" ;
37
+
35
38
pub use self :: {
36
39
handlers:: router,
37
40
sessions:: { Session , Sessions } ,
You can’t perform that action at this time.
0 commit comments