summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortummychow <tummychow@users.noreply.github.com>2018-02-15 22:32:25 -0800
committertummychow <tummychow@users.noreply.github.com>2018-02-15 22:32:25 -0800
commit182d10027d3fff2c65197723c4d41c69474f1afc (patch)
tree87cfe612b65a94b309cee02c43253214ec86b097
parent2f7a45af22e065001bbf3dd2560be03da23ee72d (diff)
use to_string instead of format!
in my defense, linking trait impls to the type's docs is a real problem with rustdoc, which makes this harder to find than it should be
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6d8018f..78c9f9d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -74,7 +74,7 @@ fn working_stack<'repo>(
if let Some(base_commit) = custom_base {
revwalk.hide(base_commit.id())?;
- debug!(logger, "commit hidden"; "commit" => format!("{}", base_commit.id()));
+ debug!(logger, "commit hidden"; "commit" => base_commit.id().to_string());
} else {
for branch in repo.branches(Some(git2::BranchType::Local))? {
let (branch, _) = branch?;
@@ -96,14 +96,14 @@ fn working_stack<'repo>(
for rev in revwalk {
let commit = repo.find_commit(rev?)?;
if commit.parents().count() > 1 {
- debug!(logger, "merge commit found"; "commit" => format!("{}", commit.id()));
+ debug!(logger, "merge commit found"; "commit" => commit.id().to_string());
break;
}
if ret.len() == max_stack(repo) {
warn!(logger, "stack limit reached"; "limit" => ret.len());
break;
}
- debug!(logger, "commit pushed onto stack"; "commit" => format!("{}", commit.id()));
+ debug!(logger, "commit pushed onto stack"; "commit" => commit.id().to_string());
ret.push(commit);
}
Ok(ret)