chore: fix clippy

This commit is contained in:
Ilya Zlobintsev
2023-01-28 09:06:20 +02:00
parent 3ce5013172
commit d1399f3c0d
2 changed files with 3 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ fn list_gpus(_: &Args, client: &DaemonClient) -> Result<()> {
}
fn info(args: &Args, client: &DaemonClient) -> Result<()> {
for id in args.gpu_ids(&client) {
for id in args.gpu_ids(client) {
let info_buffer = client.get_device_info(&id)?;
let info = info_buffer.inner()?;
let pci_info = info.pci_info.context("GPU reports no pci info")?;

View File

@@ -82,15 +82,12 @@ mod tests {
fn vec() {
let response = unsafe {
run_forked(|| {
let mut data = Vec::new();
data.push("hello".to_owned());
data.push("world".to_owned());
data.push("123".to_owned());
let data = ["hello", "world", "123"].map(str::to_owned);
Ok(data)
})
.unwrap()
};
assert_eq!(response, vec!["hello", "world", "123"])
assert_eq!(response, ["hello", "world", "123"])
}
#[test]