diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-27 16:32:58 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-27 16:33:57 +0200 |
commit | 5b52e6a0269eb2a0c3d69a1ce3312ba07d4dc997 (patch) | |
tree | 6f60e5cb5604f00bfe8a29cbc11bd2d754ed220d /src/repository | |
parent | ccd993982d22796b27f6604a3256eb43bbc706bf (diff) |
Fix: Replace unimplemented!() match arm with bail!()
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/repository')
-rw-r--r-- | src/repository/fs/representation.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/repository/fs/representation.rs b/src/repository/fs/representation.rs index d348f7e..5f92ba7 100644 --- a/src/repository/fs/representation.rs +++ b/src/repository/fs/representation.rs @@ -149,9 +149,7 @@ impl FileSystemRepresentation { return Ok(curr_hm.values().count() == 1 || !toml_files_in_tree(curr_hm)) }, Some(Element::Dir(hm)) => curr_hm = hm, - None => { - unimplemented!() - }, + None => anyhow::bail!("Path component '{:?}' was not loaded in map, this is most likely a bug", elem), } } @@ -189,9 +187,7 @@ impl FileSystemRepresentation { curr_path = curr_path.join(elem.dir_name().unwrap()); // unwrap safe by above match curr_hm = hm; } - None => { - unimplemented!() - }, + None => anyhow::bail!("Path component '{:?}' was not loaded in map, this is most likely a bug", elem), } } |