Skip to content

Commit faeca30

Browse files
authored
chore: upgrade dependencies and apply clippy fixes (#129)
1 parent 6c22e7c commit faeca30

File tree

9 files changed

+86
-88
lines changed

9 files changed

+86
-88
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repository = "https://github.com/hirosystems/stacks-devnet-api"
1515
kube = { version="0.82.2", features = ["client", "runtime"] }
1616
k8s-openapi = { version = "0.18.0", features = ["v1_25"] }
1717
futures = "0.3.31"
18-
tokio = { version = "1.35.1", features = ["full"] }
18+
tokio = { version = "1.45.1", features = ["full"] }
1919
serde = { version = "1.0", features = ["derive"] }
2020
serde_json = "1.0.132"
2121
serde_yaml = "0.8.23"
2222
hyper = { version = "0.14", features = ["full"] }
23-
tower = "0.4.13"
23+
tower = "0.5.2"
2424
strum_macros = "0.24.3"
2525
strum = "0.24.1"
2626
toml = "0.5.9"
@@ -40,6 +40,6 @@ serial_test = "2.0.0"
4040
k8s_tests = []
4141

4242
[patch.crates-io]
43-
clarinet-files = { git = "https://github.com/hirosystems/clarinet.git", rev = "a2570690549df7bf710645ab538af3deee309a01" }
44-
clarinet-deployments = { git = "https://github.com/hirosystems/clarinet.git", rev = "a2570690549df7bf710645ab538af3deee309a01" }
45-
hiro-system-kit = { git = "https://github.com/hirosystems/clarinet.git", rev = "a2570690549df7bf710645ab538af3deee309a01" }
43+
clarinet-files = { git = "https://github.com/hirosystems/clarinet.git", rev = "116137316023ae912848a1ee1845fed30b306fdc" }
44+
clarinet-deployments = { git = "https://github.com/hirosystems/clarinet.git", rev = "116137316023ae912848a1ee1845fed30b306fdc" }
45+
hiro-system-kit = { git = "https://github.com/hirosystems/clarinet.git", rev = "116137316023ae912848a1ee1845fed30b306fdc" }

src/api_config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ pub struct AuthConfig {
3232
impl ApiConfig {
3333
pub fn from_path(config_path: &str) -> ApiConfig {
3434
let file = File::open(config_path)
35-
.unwrap_or_else(|e| panic!("unable to read file {}\n{:?}", config_path, e));
35+
.unwrap_or_else(|e| panic!("unable to read file {config_path}\n{e:?}"));
3636
let mut file_reader = BufReader::new(file);
3737
let mut file_buffer = vec![];
3838
file_reader
3939
.read_to_end(&mut file_buffer)
40-
.unwrap_or_else(|e| panic!("unable to read file {}\n{:?}", config_path, e));
40+
.unwrap_or_else(|e| panic!("unable to read file {config_path}\n{e:?}"));
4141

4242
let config_file: ApiConfig = match toml::from_slice(&file_buffer) {
4343
Ok(s) => s,
4444
Err(e) => {
45-
panic!("Config file malformatted {}", e);
45+
panic!("Config file malformatted {e}");
4646
}
4747
};
4848
config_file

src/config.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl StacksDevnetConfig {
139139

140140
let yaml_str = match serde_yaml::to_string(&network_config) {
141141
Ok(s) => Ok(s),
142-
Err(e) => Err(format!("failed to parse devnet config: {}", e)),
142+
Err(e) => Err(format!("failed to parse devnet config: {e}")),
143143
}?;
144144

145145
Ok((yaml_str, devnet_config))
@@ -151,7 +151,7 @@ impl StacksDevnetConfig {
151151
project_manifest.project.cache_location =
152152
FileLocation::from_path(PathBuf::from(CONTRACT_DIR));
153153
serde_yaml::to_string(&project_manifest)
154-
.map_err(|e| format!("failed to parse project manifest: {}", e))
154+
.map_err(|e| format!("failed to parse project manifest: {e}"))
155155
}
156156

157157
pub fn get_deployment_plan_yaml_string(&self) -> Result<String, String> {
@@ -176,7 +176,7 @@ impl StacksDevnetConfig {
176176
}
177177
}
178178
serde_yaml::to_string(&self.deployment_plan)
179-
.map_err(|e| format!("failed to parse deployment plan config: {}", e))
179+
.map_err(|e| format!("failed to parse deployment plan config: {e}"))
180180
}
181181
}
182182

@@ -199,12 +199,12 @@ mod tests {
199199

200200
fn read_file(file_path: &str) -> Vec<u8> {
201201
let file = File::open(file_path)
202-
.unwrap_or_else(|e| panic!("unable to read file {}\n{:?}", file_path, e));
202+
.unwrap_or_else(|e| panic!("unable to read file {file_path}\n{e:?}"));
203203
let mut file_reader = BufReader::new(file);
204204
let mut file_buffer = vec![];
205205
file_reader
206206
.read_to_end(&mut file_buffer)
207-
.unwrap_or_else(|e| panic!("unable to read file {}\n{:?}", file_path, e));
207+
.unwrap_or_else(|e| panic!("unable to read file {file_path}\n{e:?}"));
208208
file_buffer
209209
}
210210

@@ -215,7 +215,7 @@ mod tests {
215215
let config_file: StacksDevnetConfig = match serde_json::from_slice(&file_buffer) {
216216
Ok(s) => s,
217217
Err(e) => {
218-
panic!("Config file malformatted {}", e);
218+
panic!("Config file malformatted {e}");
219219
}
220220
};
221221
config_file
@@ -291,7 +291,7 @@ mod tests {
291291
}
292292
Err(e) => {
293293
assert_eq!(e.code, 400);
294-
assert_eq!(e.message, format!("failed to validate config for NAMESPACE: {}, ERROR: devnet namespace must match authenticated user id", namespace));
294+
assert_eq!(e.message, format!("failed to validate config for NAMESPACE: {namespace}, ERROR: devnet namespace must match authenticated user id"));
295295
}
296296
}
297297
}

0 commit comments

Comments
 (0)