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

Commit 39a375f

Browse files
committed
Rename read_analysis to decode_buf
1 parent 98fe151 commit 39a375f

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
@@ -123,7 +123,7 @@ fn read_crate_data(path: &Path) -> Option<Analysis> {
123123
Err(err)
124124
})
125125
.ok()?;
126-
let s = read_analysis(&buf)
126+
let s = decode_buf(&buf)
127127
.or_else(|err| {
128128
warn!("deserialisation error: {:?}", err);
129129
json::parse(&buf)
@@ -158,12 +158,12 @@ fn read_crate_data(path: &Path) -> Option<Analysis> {
158158
}
159159

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

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

0 commit comments

Comments
 (0)