diff options
Diffstat (limited to 'src/rust.rs')
-rw-r--r-- | src/rust.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rust.rs b/src/rust.rs index 10dc1a1..0ffe8c0 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -13,6 +13,11 @@ pub struct Rust { impl Rust { pub fn new(dirname: &Path) -> Result<Self, BumperError> { let cargo_toml = dirname.join("Cargo.toml"); + debug!( + "does {} exist? {}", + cargo_toml.display(), + cargo_toml.exists() + ); if cargo_toml.exists() { return Ok(Self { dirname: dirname.to_path_buf(), @@ -22,7 +27,7 @@ impl Rust { Err(BumperError::UnknownProjectKind(dirname.to_path_buf())) } - pub fn set_version(&mut self, version: &str) -> Result<(), BumperError> { + pub fn set_version(&mut self, version: &str) -> Result<String, BumperError> { debug!("parsing Cargo.toml from {}", self.dirname.display()); // debug!("Cargo.toml:\n{:#?}", self.cargo_toml); self.cargo_toml.set_version(version)?; @@ -40,7 +45,7 @@ impl Rust { dirname.display(), version ); - Ok(()) + Ok(version.to_string()) } fn update_cargo_lock(&self) -> Result<(), BumperError> { |