ok/jj
1
0
Fork 0
forked from mirrors/jj

commit_builder: remove unneeded &mut from .write_hidden()

Since the backend::Commit has to be cloned, .write_hidden() doesn't mutate the
self.commit object.
This commit is contained in:
Yuya Nishihara 2024-07-24 20:50:43 +09:00
parent fa7f4e68c5
commit d2f933eed3

View file

@ -315,7 +315,7 @@ impl DetachedCommitBuilder {
/// ///
/// This does not consume the builder, so you can reuse the current /// This does not consume the builder, so you can reuse the current
/// configuration to create another commit later. /// configuration to create another commit later.
pub fn write_hidden(&mut self) -> BackendResult<Commit> { pub fn write_hidden(&self) -> BackendResult<Commit> {
write_to_store(&self.store, self.commit.clone(), &self.sign_settings) write_to_store(&self.store, self.commit.clone(), &self.sign_settings)
} }
} }