Skip to content

Commit 7b178bb

Browse files
committed
default fix up
1 parent b416276 commit 7b178bb

File tree

7 files changed

+14
-24
lines changed

7 files changed

+14
-24
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/config-file.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
[dropshot_external]
66
# IP address and TCP port on which to listen for the external API
77
bind_address = "127.0.0.1:12220"
8-
request_body_max_bytes = 1024
98

109
[dropshot_internal]
1110
# IP address and TCP port on which to listen for the internal API
1211
bind_address = "127.0.0.1:12221"
13-
request_body_max_bytes = 1024
1412

1513
[log]
1614
# Show log messages of this level and more severe

examples/config.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
[dropshot_external]
66
# IP address and TCP port on which to listen for the external API
77
bind_address = "127.0.0.1:12220"
8-
request_body_max_bytes = 1024
98

109
[dropshot_internal]
1110
# IP address and TCP port on which to listen for the internal API
1211
bind_address = "127.0.0.1:12221"
13-
request_body_max_bytes = 1024
1412

1513
[log]
1614
# Show log messages of this level and more severe

src/bin/sled_agent.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ async fn do_run() -> Result<(), CmdError> {
8080
id: sa_id,
8181
sim_mode,
8282
controller_address: controller_addr,
83-
dropshot: {
84-
let mut c = ConfigDropshot::default();
85-
c.bind_address = sa_addr;
86-
c
83+
dropshot: ConfigDropshot {
84+
bind_address: sa_addr,
85+
..Default::default()
8786
},
8887
log: ConfigLogging::StderrTerminal {
8988
level: ConfigLoggingLevel::Info,

src/oxide_controller/config.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,13 @@ mod test {
221221
.unwrap();
222222

223223
assert_eq!(config, ConfigController {
224-
dropshot_external: {
225-
let mut c = ConfigDropshot::default();
226-
c.bind_address = "10.1.2.3:4567".parse::<SocketAddr>().unwrap();
227-
c
224+
dropshot_external: ConfigDropshot {
225+
bind_address: "10.1.2.3:4567".parse::<SocketAddr>().unwrap(),
226+
..Default::default()
228227
},
229-
dropshot_internal: {
230-
let mut c = ConfigDropshot::default();
231-
c.bind_address = "10.1.2.3:4568".parse::<SocketAddr>().unwrap();
232-
c
228+
dropshot_internal: ConfigDropshot {
229+
bind_address: "10.1.2.3:4568".parse::<SocketAddr>().unwrap(),
230+
..Default::default()
233231
},
234232
log: ConfigLogging::File {
235233
level: ConfigLoggingLevel::Debug,

tests/common/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ pub async fn start_sled_agent(
103103
id,
104104
sim_mode: SimMode::Explicit,
105105
controller_address,
106-
dropshot: {
107-
let mut c = ConfigDropshot::default();
108-
c.bind_address = SocketAddr::new("127.0.0.1".parse().unwrap(), 0);
109-
c
106+
dropshot: ConfigDropshot {
107+
bind_address: SocketAddr::new("127.0.0.1".parse().unwrap(), 0),
108+
..Default::default()
110109
},
111110
/* TODO-cleanup this is unused */
112111
log: ConfigLogging::StderrTerminal {

tests/config.test.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#
1010
[dropshot_external]
1111
bind_address = "127.0.0.1:0"
12-
request_body_max_bytes = 1024
1312

1413
#
1514
# NOTE: for the test suite, the port MUST be 0 (in order to bind to any
@@ -18,7 +17,6 @@ request_body_max_bytes = 1024
1817
#
1918
[dropshot_internal]
2019
bind_address = "127.0.0.1:0"
21-
request_body_max_bytes = 1024
2220

2321
#
2422
# NOTE: for the test suite, if mode = "file", the file path MUST be the sentinel

0 commit comments

Comments
 (0)