Skip to content

Commit d3e1bf9

Browse files
committed
nits
1 parent a68afc5 commit d3e1bf9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libcore/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ extern "rust-intrinsic" {
13361336
/// Checks whether `ptr` is properly aligned with respect to
13371337
/// `align_of::<T>()`.
13381338
pub(crate) fn is_aligned_and_not_null<T>(ptr: *const T) -> bool {
1339-
return !ptr.is_null() && ptr as usize % mem::align_of::<T>() == 0;
1339+
!ptr.is_null() && ptr as usize % mem::align_of::<T>() == 0
13401340
}
13411341

13421342
/// Checks whether the regions of memory starting at `src` and `dst` of size

src/librustc_codegen_llvm/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn search_meta_section<'a>(of: &'a ObjectFile,
6969
let mut name_buf = None;
7070
let name_len = llvm::LLVMRustGetSectionName(si.llsi, &mut name_buf);
7171
let name = name_buf.map_or(
72-
String::new(), // we got a NULL ptr, ignore `name_len`
72+
String::new(), // We got a NULL ptr, ignore `name_len`.
7373
|buf| String::from_utf8(
7474
slice::from_raw_parts(buf.as_ptr() as *const u8,
7575
name_len as usize)

0 commit comments

Comments
 (0)