##// END OF EJS Templates
rust: fix clippy lints...
Raphaël Gomès -
r53188:f90796d3 default
parent child Browse files
Show More
@@ -206,11 +206,10 impl<G: Graph> MissingAncestors<G> {
206 206 new_bases
207 207 .into_iter()
208 208 .filter(|&rev| rev != NULL_REVISION)
209 .map(|r| {
209 .inspect(|&r| {
210 210 if r > max_base {
211 211 max_base = r;
212 212 }
213 r
214 213 }),
215 214 );
216 215 self.max_base = max_base;
@@ -217,7 +217,7 pub struct FilelogRevisionData(Vec<u8>);
217 217 impl FilelogRevisionData {
218 218 /// Split into metadata and data
219 219 pub fn split(&self) -> Result<(Option<&[u8]>, &[u8]), HgError> {
220 const DELIMITER: &[u8; 2] = &[b'\x01', b'\n'];
220 const DELIMITER: &[u8; 2] = b"\x01\n";
221 221
222 222 if let Some(rest) = self.0.drop_prefix(DELIMITER) {
223 223 if let Some((metadata, data)) = rest.split_2_by_slice(DELIMITER) {
@@ -802,9 +802,8 impl InnerRevlog {
802 802 return Ok(func());
803 803 }
804 804 self.enter_writing_context(data_end, transaction)
805 .map_err(|e| {
805 .inspect_err(|_| {
806 806 self.exit_writing_context();
807 e
808 807 })?;
809 808 let res = func();
810 809 self.exit_writing_context();
@@ -31,10 +31,10
31 31 ///
32 32 /// * `$name` is the identifier to give to the resulting Rust struct.
33 33 /// * `$leaked` corresponds to `UnsafePyLeaked` in the matching `@shared data`
34 /// declaration.
34 /// declaration.
35 35 /// * `$iterator_type` is the type of the Rust iterator.
36 36 /// * `$success_func` is a function for processing the Rust `(key, value)`
37 /// tuple on iteration success, turning it into something Python understands.
37 /// tuple on iteration success, turning it into something Python understands.
38 38 /// * `$success_func` is the return type of `$success_func`
39 39 ///
40 40 /// # Safety
General Comments 0
You need to be logged in to leave comments. Login now