Minor code cleanup.

This commit is contained in:
Scott Olson 2015-09-27 20:26:12 -06:00
parent a305b0624b
commit 55e48420db
4 changed files with 5 additions and 5 deletions

View File

@ -264,7 +264,7 @@ fn test_str_add() {
#[test] #[test]
fn remove() { fn remove() {
let mut s = "ศไทย中华Việt Nam; foobar".to_string();; let mut s = "ศไทย中华Việt Nam; foobar".to_string();
assert_eq!(s.remove(0), 'ศ'); assert_eq!(s.remove(0), 'ศ');
assert_eq!(s.len(), 33); assert_eq!(s.len(), 33);
assert_eq!(s, "ไทย中华Việt Nam; foobar"); assert_eq!(s, "ไทย中华Việt Nam; foobar");

View File

@ -726,7 +726,7 @@ fn get_metadata_section(target: &Target, filename: &Path)
ret = Some(get_metadata_section_imp(target, filename)); ret = Some(get_metadata_section_imp(target, filename));
}); });
info!("reading {:?} => {:?}", filename.file_name().unwrap(), dur); info!("reading {:?} => {:?}", filename.file_name().unwrap(), dur);
return ret.unwrap();; ret.unwrap()
} }
fn get_metadata_section_imp(target: &Target, filename: &Path) fn get_metadata_section_imp(target: &Target, filename: &Path)

View File

@ -216,7 +216,7 @@ pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
is_warning, infcx.tcx.sess, obligation.cause.span, E0276, is_warning, infcx.tcx.sess, obligation.cause.span, E0276,
"the requirement `{}` appears on the impl \ "the requirement `{}` appears on the impl \
method but not on the corresponding trait method", method but not on the corresponding trait method",
obligation.predicate);; obligation.predicate);
} else { } else {
match obligation.predicate { match obligation.predicate {
ty::Predicate::Trait(ref trait_predicate) => { ty::Predicate::Trait(ref trait_predicate) => {
@ -455,7 +455,7 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
if !infcx.tcx.sess.has_errors() { if !infcx.tcx.sess.has_errors() {
span_err!(infcx.tcx.sess, obligation.cause.span, E0284, span_err!(infcx.tcx.sess, obligation.cause.span, E0284,
"type annotations required: cannot resolve `{}`", "type annotations required: cannot resolve `{}`",
predicate);; predicate);
note_obligation_cause(infcx, obligation); note_obligation_cause(infcx, obligation);
} }
} }

View File

@ -39,5 +39,5 @@ pub fn main() {
assert_eq!(v, 22); assert_eq!(v, 22);
let v = Counter::new(22).inc().inc().get(); let v = Counter::new(22).inc().inc().get();
assert_eq!(v, 24);; assert_eq!(v, 24);
} }