Skip to content

Commit 2fd23ed

Browse files
committed
[object #177] fix docs
1 parent b201b32 commit 2fd23ed

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

git-actor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! This crate provides ways of identifying an actor within the git repository both in shared/signature_ref and mutable variants.
1+
//! This crate provides ways of identifying an actor within the git repository both in shared/mutable and mutable variants.
22
#![forbid(unsafe_code)]
33
#![deny(rust_2018_idioms, missing_docs)]
44
use bstr::{BStr, BString};

git-actor/src/signature/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mod convert {
4141
}
4242

4343
impl Signature {
44-
/// Borrow this instance as signature_ref
44+
/// Borrow this instance as immutable
4545
pub fn to_ref(&self) -> SignatureRef<'_> {
4646
SignatureRef {
4747
name: self.name.as_ref(),

git-config/src/file/git_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<'event> GitConfig<'event> {
306306
.map_err(|_| GitConfigError::FailedConversion)
307307
}
308308

309-
/// Returns an signature_ref section reference.
309+
/// Returns an immutable section reference.
310310
///
311311
/// # Errors
312312
///

git-object/src/immutable/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
//! Immutable objects are read-only structures referencing most data from [a byte slice][crate::ObjectRef::from_bytes()].
2-
//!
3-
//! 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_owned()] them into their [`mutable`][crate::mutable] counterparts
5-
//! which support mutation and serialization.
6-
71
///
82
pub mod object;

git-object/src/immutable/object.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ impl<'a> ObjectRef<'a> {
1111
})
1212
}
1313

14-
/// Convert the signature_ref object into a mutable version, consuming the source in the process.
14+
/// Convert the immutable object into a mutable version, consuming the source in the process.
1515
///
1616
/// Note that this is an expensive operation.
1717
pub fn into_owned(self) -> Object {
1818
self.into()
1919
}
2020

21-
/// Convert this signature_ref object into its mutable counterpart.
21+
/// Convert this immutable object into its mutable counterpart.
2222
///
2323
/// Note that this is an expensive operation.
2424
pub fn to_owned(&self) -> Object {

git-object/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub use types::{Error, Kind};
1414

1515
use crate::tree::EntryRef;
1616

17+
///
1718
pub mod immutable;
1819

1920
///
@@ -150,7 +151,13 @@ pub struct Tag {
150151
pub pgp_signature: Option<BString>,
151152
}
152153

153-
/// An signature_ref object representing [`Trees`][TreeRef], [`Blobs`][BlobRef], [`Commits`][CommitRef], or [`Tags`][TagRef].
154+
/// Immutable objects are read-only structures referencing most data from [a byte slice][crate::ObjectRef::from_bytes()].
155+
///
156+
/// Immutable objects are expected to be deserialized from bytes that acts as backing store, and they
157+
/// cannot be mutated or serialized. Instead, one will [convert][crate::ObjectRef::into_owned()] them into their [`mutable`][crate::mutable] counterparts
158+
/// which support mutation and serialization.
159+
///
160+
/// An object is representing [`Trees`][TreeRef], [`Blobs`][BlobRef], [`Commits`][CommitRef], or [`Tags`][TagRef].
154161
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
155162
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
156163
#[allow(missing_docs)]

git-ref/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub enum Target {
7171
Symbolic(FullName),
7272
}
7373

74-
/// Denotes a ref target, equivalent to [`Kind`], but with signature_ref data.
74+
/// Denotes a ref target, equivalent to [`Kind`], but with immutable data.
7575
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
7676
pub enum TargetRef<'a> {
7777
/// A ref that points to an object id

git-repository/src/easy/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub struct State {
113113

114114
/// A utility trait to represent access to a repository.
115115
///
116-
/// It provides signature_ref and possibly mutable access. Both types of access are validated at runtime, which may fail
116+
/// It provides immutable and possibly mutable access. Both types of access are validated at runtime, which may fail
117117
/// or may block, depending on the implementation.
118118
///
119119
/// Furthermore it provides access to additional state for use with the [`Repository`]. It is designed for thread-local

0 commit comments

Comments
 (0)