Skip to content

Commit 31eeac8

Browse files
authored
Fix function anyhow::Ok shadowing Result::Ok (esp-rs#27)
A new `anyhow` version (1.0.49) introduced a new function `Ok`. Glob imports pulled in this new function which in turn shadowed the `Result::Ok` variant causing build failure. This is now fixed by only importing what we need from anyhow.
1 parent c25189e commit 31eeac8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/bindgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ffi::OsStr;
22
use std::path::{Path, PathBuf};
33
use std::{env, fs};
44

5-
use anyhow::*;
5+
use anyhow::{anyhow, bail, Context, Error, Result};
66

77
use crate::utils::OsStrExt;
88
use crate::{cargo, cli, cmake, cmd, cmd_output, pio};

src/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::fmt::{Display, Write};
33
use std::path::{Path, PathBuf};
44
use std::{env, fs};
55

6-
use anyhow::*;
6+
use anyhow::{anyhow, bail, Error, Result};
77
use cargo_toml::{Manifest, Product};
88
use log::*;
99

src/pio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::io::Write;
88
use std::path::{Path, PathBuf};
99
use std::process::{Command, Output, Stdio};
1010

11-
use anyhow::*;
11+
use anyhow::{bail, Result};
1212
use log::*;
1313
use serde::de::DeserializeOwned;
1414
use serde::{Deserialize, Serialize};

src/python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::*;
1+
use anyhow::{anyhow, Context, Result};
22

33
use crate::cmd_output;
44

0 commit comments

Comments
 (0)