Skip to content

Commit

Permalink
Fix spelling errors and add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaka91 committed Apr 17, 2023
1 parent eb3ec0c commit f632199
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
11 changes: 10 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ allow = []
allow-osi-fsf-free = "both"
exceptions = [
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" },
]
]

[bans]
skip = [
{ name = "redox_syscall", version = "=0.2.16" },
{ name = "syn", version = "=1.0.109" },
]
skip-tree = [
{ name = "windows-sys", version = "=0.45.0", depth = 3 },
]
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
clippy::expect_used,
clippy::unwrap_used
)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::module_name_repetitions, clippy::multiple_crate_versions)]

pub use camino::{self, Utf8Path, Utf8PathBuf};

Expand Down
2 changes: 1 addition & 1 deletion src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use camino::{Utf8Path, Utf8PathBuf};
use crate::Directories;

/// Local directories are meant mostly for debug purposes while developing an application. By
/// default it provides all available directories in under a `.local` folder in the current working
/// default it provides all available directories under a `.local` folder in the current working
/// directory.
///
/// An alternative base directory can be provided with the [`LocalDirs::new_at`] function.
Expand Down
2 changes: 1 addition & 1 deletion src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use camino::{Utf8Path, Utf8PathBuf};

use crate::Directories;

/// Service directories are used for applications that run as a service (or often call daemon),
/// Service directories are used for applications that run as a service (or often called daemon),
/// usually run by a dedicated user account and controlled by the system rather than the user.
///
/// The directories are therefore rather global and close to the system instead of being located in
Expand Down
6 changes: 4 additions & 2 deletions src/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where
/// Use certain environment variable names to detect to be in service mode. The value of each
/// variable doesn't matter, just whether the variable is present.
///
/// Currently the name `SERVCIE` and `DAEMON` indicate the service mode.
/// Currently the name `SERVICE` and `DAEMON` indicate the service mode.
#[must_use]
pub fn with_env(self) -> Self {
self.with(|_| env::vars_os().any(|(name, _)| name == "SERVICE" || name == "DAEMON"))
Expand All @@ -50,7 +50,9 @@ where
/// Compare the executing user's account name against the application name to detect the service
/// mode.
///
/// It is common to create a separate
/// It is common to create a separate a separate user with the same name as the application,
/// which is then used to execute the application. Therefore, if the application name passed in
/// [`UnifiedDirs::simple`] matches the executing username, it indicates the service mode.
#[must_use]
pub fn with_username(self) -> Self {
self.with(|builder| whoami::username_os() == builder.application.as_ref())
Expand Down
6 changes: 6 additions & 0 deletions src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ use camino::{Utf8Path, Utf8PathBuf};

use crate::Directories;

/// User directories are used when applications are directly run by local regular users. The folder
/// locations vary greatly by platform, as each has their own rules about where to put them.
///
/// ## Linux
///
/// On Linux systems the folders are usually located in the home folder, but may be overridden by
/// the common [XDG user directory](https://wiki.archlinux.org/title/XDG_user_directories)
/// environment variables.
///
/// | Type | Location |
/// | ------ | -------------------------------------------------------- |
/// | Cache | `$XDG_CACHE_HOME`/`<app>` or `$HOME`/.cache/`<app>` |
Expand Down

0 comments on commit f632199

Please sign in to comment.