Skip to content

Commit

Permalink
Remove ignored doc-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-tkach committed Jul 31, 2022
1 parent ef3ee1b commit b73bb8f
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions os_info/src/linux/file_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ fn retrieve(distributions: &[ReleaseInfo], root: &str) -> Option<Info> {
/// Struct containing information on how to parse distribution info from a
/// release file.
///
/// # Example
/// ```rust,ignore
/// # Examples
///
/// ```
/// ReleaseInfo {
/// path: "/etc/fedora-release",
/// os_type: |_| Some(Type::Fedora),
Expand All @@ -67,37 +68,17 @@ fn retrieve(distributions: &[ReleaseInfo], root: &str) -> Option<Info> {
/// .find(&release)
/// .map(Version::from_string)
/// },
/// },
/// }
/// ```
#[derive(Clone)]
struct ReleaseInfo<'a> {
/// Relative path to the release file this struct corresponds to from root.
///
/// # Example
/// ```rust,ignore
/// path: "etc/os-release"
/// ```
path: &'a str,

/// A closure that determines the os type from the release file contents.
///
/// # Example
/// ```rust,ignore
/// //path: "/etc/mariner-release",
/// os_type: |_| Some(Type::Mariner),
/// ```
os_type: for<'b> fn(&'b str) -> Option<Type>,

/// A closure that determines the os version from the release file contents.
///
/// # Example
/// ```rust,ignore
/// version: |release| {
/// Matcher::KeyValue { key: "VERSION_ID" }
/// .find(&release)
/// .map(Version::from_string)
/// },
/// ```
version: for<'b> fn(&'b str) -> Option<Version>,
}

Expand Down

0 comments on commit b73bb8f

Please sign in to comment.