Page MenuHomePhabricator

rust: Remove unnecessary check for absolute path before joining
ClosedPublic

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

Details

Summary

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Fri, Feb 5, 4:26 AM
Alphare accepted this revision.Mon, Feb 8, 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.Mon, Feb 8, 2:00 PM
Alphare accepted this revision.Tue, Feb 9, 3:33 AM
pulkit accepted this revision.Wed, Feb 10, 7:05 AM
This revision is now accepted and ready to land.Wed, Feb 10, 7:05 AM