Skip to content

Commit 107d636

Browse files
committed
docs: add documentation for from_os() method
1 parent 86e8e85 commit 107d636

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/async_resolver.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,15 @@ impl AsyncResolver {
480480
}
481481
}
482482

483+
/// Creates a new `AsyncResolver` based on the operating system of the current environment.
484+
///
485+
/// # Panics
486+
/// This function panics if the operating system is neither "linux" nor "windows".
487+
///
488+
/// # Examples
489+
/// ```
490+
/// let resolver = AsyncResolver::from_os();
491+
/// ```
483492
pub fn from_os() -> Self {
484493
let os = env::consts::OS;
485494
match os {

0 commit comments

Comments
 (0)