History

[object #177] into_mutable() -> into_owned()

Sebastian Thiel committed 5 years ago

Commit 7e701ce1 parent 25d8e7b4 files · +5 −5Browse files

Showing the changes to git-object/src (3 of 4 files). Show all

Unified · Split

3 files
  1. git-object/src/immutable/mod.rs +1 −1
  2. git-object/src/immutable/object.rs +2 −2
  3. git-object/src/mutable/mod.rs +1 −1
git-object/src/immutable/mod.rs+1−1
@@ -1,7 +1,7 @@
11 //! Immutable objects are read-only structures referencing most data from [a byte slice][crate::ObjectRef::from_bytes()].
22 //!
33 //! Immutable objects are expected to be deserialized from bytes that acts as backing store, and they
4−//! cannot be mutated or serialized. Instead, one will [convert][crate::ObjectRef::into_mutable()] them into their [`mutable`][crate::mutable] counterparts
4+//! cannot be mutated or serialized. Instead, one will [convert][crate::ObjectRef::into_owned()] them into their [`mutable`][crate::mutable] counterparts
55 //! which support mutation and serialization.
66
77 ///
git-object/src/immutable/object.rs+2−2
@@ -14,14 +14,14 @@ impl<'a> ObjectRef<'a> { · 13 unmodified lines
1414 /// Convert the signature_ref object into a mutable version, consuming the source in the process.
1515 ///
1616 /// Note that this is an expensive operation.
17− pub fn into_mutable(self) -> Object {
17+ pub fn into_owned(self) -> Object {
1818 self.into()
1919 }
2020
2121 /// Convert this signature_ref object into its mutable counterpart.
2222 ///
2323 /// Note that this is an expensive operation.
24− pub fn to_mutable(&self) -> Object {
24+ pub fn to_owned(&self) -> Object {
2525 self.clone().into()
2626 }
2727 }
git-object/src/mutable/mod.rs+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 //!
33 //! Mutable objects are Commits, Trees, Blobs and Tags that can be changed and serialized.
44 //! They either created using object [construction][crate::Object] or by [deserializing existing objects][crate::ObjectRef::from_bytes()]
5−//! and converting these [into mutable copies][crate::ObjectRef::into_mutable()] for adjustments.
5+//! and converting these [into mutable copies][crate::ObjectRef::into_owned()] for adjustments.
66
77 pub(crate) const NL: &[u8; 1] = b"\n";
88 pub(crate) const SPACE: &[u8; 1] = b" ";