From 4128cc4cb44acb415be3cfdfa008fd6c95ceee74 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 30 Aug 2012 12:54:50 -0700 Subject: Make utility funs in core::int, core::uint, etc. not by-reference Closes #3302 --- src/libsyntax/ast_util.rs | 4 ++-- src/libsyntax/parse/comments.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 3badb0fbfce..f89b1607a70 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -568,8 +568,8 @@ fn compute_id_range(visit_ids_fn: fn(fn@(node_id))) -> id_range { let min = @mut int::max_value; let max = @mut int::min_value; do visit_ids_fn |id| { - *min = int::min(min, &id); - *max = int::max(max, &(id + 1)); + *min = int::min(*min, id); + *max = int::max(*max, id + 1); } return {min:*min, max:*max}; } diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index b4c9eb6f69e..7b18ca532e0 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -182,7 +182,7 @@ fn trim_whitespace_prefix_and_push_line(&lines: ~[~str], s: ~str, col: uint) unsafe { let mut s1; let len = str::len(s); - if all_whitespace(s, 0u, uint::min(&len, &col)) { + if all_whitespace(s, 0u, uint::min(len, col)) { if col < len { s1 = str::slice(s, col, len); } else { s1 = ~""; } -- cgit 1.4.1-3-g733a5