Skip to content

Commit

Permalink
docs: Further cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Mar 4, 2025
1 parent 0dd14e3 commit 810d629
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ enum SourceType {
impl BuilderState for DefaultState {}
impl BuilderState for AsyncState {}

/// Operations allowed in any state
impl<St: BuilderState> ConfigBuilder<St> {
// operations allowed in any state

/// Set a default `value` at `key`
///
/// This value can be overwritten by any [`Source`], [`AsyncSource`] or override.
Expand Down Expand Up @@ -183,9 +182,8 @@ impl<St: BuilderState> ConfigBuilder<St> {
}
}

/// Operations allowed in sync state
impl ConfigBuilder<DefaultState> {
// operations allowed in sync state

/// Registers new [`Source`] in this builder.
///
/// Calling this method does not invoke any I/O. [`Source`] is only saved in internal register for later use.
Expand Down Expand Up @@ -273,9 +271,8 @@ impl ConfigBuilder<DefaultState> {
}
}

/// Operations allowed in async state
impl ConfigBuilder<AsyncState> {
// operations allowed in async state

/// Registers new [`Source`] in this builder.
///
/// Calling this method does not invoke any I/O. [`Source`] is only saved in internal register for later use.
Expand Down
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ use crate::ser::ConfigSerializer;
use crate::source::Source;
use crate::value::{Table, Value};

/// A prioritized configuration repository. It maintains a set of
/// configuration sources, fetches values to populate those, and provides
/// A prioritized configuration repository.
///
/// It maintains a set of configuration sources, fetches values to populate those, and provides
/// them according to the source's priority.
#[derive(Clone, Debug)]
pub struct Config {
Expand Down
4 changes: 2 additions & 2 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::map::Map;

/// Underlying kind of the configuration value.
///
/// Standard operations on a `Value` by users of this crate do not require
/// knowledge of `ValueKind`. Introspection of underlying kind is only required
/// Standard operations on a [`Value`] by users of this crate do not require
/// knowledge of [`ValueKind`]. Introspection of underlying kind is only required
/// when the configuration values are unstructured or do not have known types.
#[derive(Debug, Clone, PartialEq)]
pub enum ValueKind {
Expand Down

0 comments on commit 810d629

Please sign in to comment.