mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-06 11:06:58 +03:00
Remove the Errors section from rust docs
The section does not add anything that we don't already know. Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
18c6c7ebb7
commit
adc5ef911f
@ -54,12 +54,6 @@ pub mod legacy {
|
|||||||
/// * A `PathBuf` containing the compacted file path. If the input path
|
/// * A `PathBuf` containing the compacted file path. If the input path
|
||||||
/// does not have the user's home directory prefix, or if we are not on
|
/// does not have the user's home directory prefix, or if we are not on
|
||||||
/// Linux or macOS, the original path is returned unchanged.
|
/// Linux or macOS, the original path is returned unchanged.
|
||||||
///
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// This function will not produce any errors, but in case the input path
|
|
||||||
/// cannot be stripped of the home directory prefix, the original path
|
|
||||||
/// will be returned unchanged.
|
|
||||||
pub fn compact(path: &Path) -> PathBuf {
|
pub fn compact(path: &Path) -> PathBuf {
|
||||||
if cfg!(target_os = "linux") || cfg!(target_os = "macos") {
|
if cfg!(target_os = "linux") || cfg!(target_os = "macos") {
|
||||||
match path.strip_prefix(HOME.as_path()) {
|
match path.strip_prefix(HOME.as_path()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user