From b5ab006bec6146dc45da9d9769b413904c648d89 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Mon, 29 May 2023 17:42:55 +0200 Subject: [PATCH] Revert finding cbindgen.toml logic change --- src/main.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4e167368d..ea2ef88f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,18 +84,7 @@ fn load_bindings(input: &Path, matches: &ArgMatches) -> Result // Load any config specified or search in the input directory let mut config = match matches.value_of("config") { Some(c) => Config::from_file(c).unwrap(), - None => { - // In contrast to `Config::from_root_or_default` we look for - // cbindgen.toml next to the current _file_. There is always - // a parent (at the very least the root), so unwrapping is fine. - let c = input.parent().unwrap().join("cbindgen.toml"); - - if c.exists() { - Config::from_file(&c).unwrap() - } else { - Config::default() - } - } + None => Config::from_root_or_default(input), }; apply_config_overrides(&mut config, matches);