Use char/byte literals instead of single-char/byte string literals.

This commit is contained in:
Dan Gohman
2019-08-13 17:17:37 -07:00
committed by Jakub Konka
parent 2809be666a
commit 05852977ac
3 changed files with 10 additions and 10 deletions

View File

@@ -86,9 +86,9 @@ pub(crate) fn readlinkat(dirfd: &File, s_path: &str) -> Result<String> {
log::debug!("readlinkat error={:?}", e);
match WinError::from_u32(e as u32) {
WinError::ERROR_INVALID_NAME => {
if s_path.ends_with("/") {
if s_path.ends_with('/') {
// strip "/" and check if exists
let path = concatenate(dirfd, Path::new(s_path.trim_end_matches("/")))?;
let path = concatenate(dirfd, Path::new(s_path.trim_end_matches('/')))?;
if path.exists() && !path.is_dir() {
Err(host::__WASI_ENOTDIR)
} else {