From e40a43cd1f4ea69f9ec95fbcbbb89621db31ccae Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 12 May 2015 16:24:52 +0200 Subject: [PATCH] rustRacer: 2015-04-12 -> 2015-05-04 --- pkgs/development/tools/rust/racer/default.nix | 10 ++++--- .../development/tools/rust/racer/pr-232.patch | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/tools/rust/racer/pr-232.patch diff --git a/pkgs/development/tools/rust/racer/default.nix b/pkgs/development/tools/rust/racer/default.nix index 4887736a8591..2b1f84c6b909 100644 --- a/pkgs/development/tools/rust/racer/default.nix +++ b/pkgs/development/tools/rust/racer/default.nix @@ -4,14 +4,16 @@ with rustPlatform; buildRustPackage rec { #TODO add emacs support - name = "racer-git-2015-04-12"; + name = "racer-git-2015-05-04"; src = fetchgit { url = https://github.com/phildawes/racer; - rev = "5437e2074d87dfaab75a0f1bd2597bed61c0bbf1"; - sha256 = "0a768gvjry86l0xa5q0122iyq7zn2h9adfniglsgrbs4fan49xyn"; + rev = "bf2373ec08b0be03598283bd610c5b61bdb8738c"; + sha256 = "0ldf05d19ghxk3fslxrc87j18zg8bam2y0ygdy456h37y2p1d1ck"; }; - depsSha256 = "13rnxr5inrfnmg5mg2vap17fd2jp32g2a70pfi1sshi6vjr8kpap"; + patches = [ ./pr-232.patch ]; + + depsSha256 = "0rinyh365znx39aygxyyxmi496pw0alblf2dl7l8fbmz63nkhfv2"; buildInputs = [ makeWrapper ]; diff --git a/pkgs/development/tools/rust/racer/pr-232.patch b/pkgs/development/tools/rust/racer/pr-232.patch new file mode 100644 index 000000000000..354307d71e4f --- /dev/null +++ b/pkgs/development/tools/rust/racer/pr-232.patch @@ -0,0 +1,26 @@ +From 3f354d69881424c7c902408d22f9138412a872b4 Mon Sep 17 00:00:00 2001 +From: Ricardo Martins +Date: Sat, 9 May 2015 17:12:55 +0100 +Subject: [PATCH] Use `Vec::extend` instead of binary operation `+`. + +--- + src/racer/nameres.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/racer/nameres.rs b/src/racer/nameres.rs +index 60636c6..ad1e01c 100644 +--- a/src/racer/nameres.rs ++++ b/src/racer/nameres.rs +@@ -620,9 +620,9 @@ pub fn search_scope(start: usize, point: usize, src: &str, + } + + // There's a good chance of a match. Run the matchers +- out = out + &*run_matchers_on_blob(src, start+blobstart, start+blobend, +- searchstr, +- filepath, search_type, local, namespace); ++ out.extend(run_matchers_on_blob(src, start+blobstart, start+blobend, ++ searchstr, ++ filepath, search_type, local, namespace)); + if let ExactMatch = search_type { + if !out.is_empty() { + return out.into_iter();