BurntSushi / same-file

Cross platform Rust library for checking whether two file paths are the same file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note why `Handle` methods in `win` won't panic

KodrAus opened this issue · comments

Relevant API Guidelines:

The win implementation of Handle calls unwrap in the following methods:

  • Drop::drop
  • AsRawFd::as_raw_fd
  • IntoRawFd::into_raw_fd
  • as_file
  • as_file_mut

These calls should either have a comment inline documenting why they can't fail, or a Panics section should be added to the docs documenting when they will fail.

I'll have a look into this.