diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-10 14:57:16 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-10 14:57:16 +0800 |
| commit | 782d2458dc4ad4336e1407e1f107e43e39b0b991 (patch) | |
| tree | 2619912357c03cae32190388e9436e15431c298c /mingling/src/res/dirs/current_exe.rs | |
| parent | 6b18873666e17ab68ffce799b1707c030166738f (diff) | |
chore: enforce pedantic clippy lints and fix warnings
Diffstat (limited to 'mingling/src/res/dirs/current_exe.rs')
| -rw-r--r-- | mingling/src/res/dirs/current_exe.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mingling/src/res/dirs/current_exe.rs b/mingling/src/res/dirs/current_exe.rs index 051f380..a2afc0b 100644 --- a/mingling/src/res/dirs/current_exe.rs +++ b/mingling/src/res/dirs/current_exe.rs @@ -22,9 +22,11 @@ pub struct ResCurrentExe { impl ResCurrentExe { /// Creates a new `ResCurrentExe` by querying the OS for the current executable path. /// - /// Returns `Err` if the executable path cannot be determined (e.g., the `/proc` - /// filesystem is not available on Linux, or the process handle is invalid). - /// Unlike the `Default` implementation, this method does not panic on failure. + /// # Errors + /// + /// Returns an [`std::io::Error`] if the OS is unable to provide the path of the + /// current executable. This can occur, for example, when the `/proc` filesystem + /// is not mounted on Linux, or when the process handle is invalid on Windows. pub fn new() -> Result<Self, std::io::Error> { Ok(Self { exe: current_exe()?, |
