Skip to content

Commit

Permalink
revisionstore: fix GitHub build (#46)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46

See https://github.com/facebookexperimental/eden/runs/1034006668:

   error: unused import: `env::set_var`
      --> src/lfs.rs:1539:15
       |
  1539 |     use std::{env::set_var, str::FromStr};
       |               ^^^^^^^^^^^^
       |
  note: the lint level is defined here
      --> src/lib.rs:125:9
       |
  125  | #![deny(warnings)]
       |         ^^^^^^^^
       = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

  error: unnecessary braces around method argument
      --> src/lfs.rs:2439:36
       |
  2439 |         remote.batch_upload(&objs, { move |sha256| local_lfs.blobs.get(&sha256) })?;
       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
       |
  note: the lint level is defined here
      --> src/lib.rs:125:9
       |
  125  | #![deny(warnings)]
       |         ^^^^^^^^
       = note: `#[deny(unused_braces)]` implied by `#[deny(warnings)]`

  error: aborting due to 2 previous errors

  error: could not compile `revisionstore`.

I dropped `#![deny(warnings)]` as I don't think warnings like the above ones
should break the build. (denying specific warnings that we care about explicitly
might be a better approach)

Reviewed By: singhsrb

Differential Revision: D23362178

fbshipit-source-id: 02258f57727edfac9818cd29dda5e451c7ca80a7
  • Loading branch information
quark-zju authored and facebook-github-bot committed Aug 27, 2020
1 parent 712ebc2 commit 12d23ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions eden/scm/lib/revisionstore/src/lfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ impl LocalStore for LfsFallbackRemoteStore {
mod tests {
use super::*;

use std::{env::set_var, str::FromStr};
use std::str::FromStr;

use quickcheck::quickcheck;
use tempfile::TempDir;
Expand Down Expand Up @@ -2088,6 +2088,7 @@ mod tests {
#[cfg(feature = "fb")]
mod fb_test {
use super::*;
use std::env::set_var;

#[test]
fn test_lfs_non_present() -> Result<()> {
Expand Down Expand Up @@ -2436,7 +2437,7 @@ mod tests {
.iter()
.cloned()
.collect::<HashSet<_>>();
remote.batch_upload(&objs, { move |sha256| local_lfs.blobs.get(&sha256) })?;
remote.batch_upload(&objs, move |sha256| local_lfs.blobs.get(&sha256))?;

assert_eq!(remote_lfs_file_store.get(&blob1.0)?, Some(blob1.2));
assert_eq!(remote_lfs_file_store.get(&blob2.0)?, Some(blob2.2));
Expand Down
2 changes: 0 additions & 2 deletions eden/scm/lib/revisionstore/types/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* GNU General Public License version 2.
*/

#![deny(warnings)]

//! revisionstore_types - Data types used by the revisionstore crate
mod datastore;
Expand Down

0 comments on commit 12d23ba

Please sign in to comment.