This is an archive of the discontinued Mercurial Phabricator instance.

rust: Remove unnecessary check for absolute path before joining
ClosedPublic

Authored by SimonSapin on Feb 5 2021, 4:26 AM.

Details

Summary

Path::join does the right thing if its argument is absolute.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

SimonSapin created this revision.Feb 5 2021, 4:26 AM
Alphare accepted this revision.Feb 8 2021, 9:04 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/src/config/layer.rs
100

I think we should always try to use expect instead of unwrap unless it's *really* repetitive or obvious, just as a best practice.

SimonSapin updated this revision to Diff 25497.Feb 8 2021, 2:00 PM
Alphare accepted this revision.Feb 9 2021, 3:33 AM
pulkit accepted this revision.Feb 10 2021, 7:05 AM
This revision is now accepted and ready to land.Feb 10 2021, 7:05 AM