Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 98fe151

Browse files
committed
Fix pointer to pointer silliness
1 parent e100664 commit 98fe151

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rls-analysis/src/raw.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ fn read_crate_data(path: &Path) -> Option<Analysis> {
158158
}
159159

160160
#[cfg(feature = "serialize-rustc")]
161-
fn read_analysis(buf: &String) -> Result<Option<Analysis>, rustc_serialize::json::DecoderError> {
162-
::rustc_serialize::json::decode(&buf)
161+
fn read_analysis(buf: &str) -> Result<Option<Analysis>, rustc_serialize::json::DecoderError> {
162+
::rustc_serialize::json::decode(buf)
163163
}
164164

165165
#[cfg(feature = "serialize-serde")]
166-
fn read_analysis(buf: &String) -> Result<Option<Analysis>, serde_json::Error> {
166+
fn read_analysis(buf: &str) -> Result<Option<Analysis>, serde_json::Error> {
167167
::serde_json::from_str(buf)
168168
}
169169

0 commit comments

Comments
 (0)