mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
mononoke: server: repo: reformat and loosen constraints on repo error
Summary: Loosen type constraint on the error slightly, and rustfmt. Reviewed By: sid0 Differential Revision: D5764616 fbshipit-source-id: 265071f775fac5ea40e8ba45a7da961904b3b397
This commit is contained in:
parent
25211f5699
commit
a4c62d44e8
@ -6,33 +6,33 @@
|
|||||||
|
|
||||||
//! State for a single source control Repo
|
//! State for a single source control Repo
|
||||||
|
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
|
use std::error;
|
||||||
use std::fmt::{self, Debug};
|
use std::fmt::{self, Debug};
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
|
use std::mem;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::collections::{HashMap, HashSet};
|
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures::{Async, BoxFuture, Future, IntoFuture, Poll, Stream, future, stream};
|
use futures::{future, stream, Async, BoxFuture, Future, IntoFuture, Poll, Stream};
|
||||||
use futures_ext::StreamExt;
|
use futures_ext::StreamExt;
|
||||||
use error_chain::ChainedError;
|
|
||||||
|
|
||||||
use slog::Logger;
|
use slog::Logger;
|
||||||
|
|
||||||
use async_compression::CompressorType;
|
use async_compression::CompressorType;
|
||||||
use bookmarks::Bookmarks;
|
use bookmarks::Bookmarks;
|
||||||
use mercurial;
|
use mercurial;
|
||||||
use mercurial_bundles::{Bundle2EncodeBuilder, parts};
|
use mercurial_bundles::{parts, Bundle2EncodeBuilder};
|
||||||
use mercurial_types::{BoxRepo, Changeset, NULL_HASH, NodeHash, Parents, Repo, percent_encode};
|
use mercurial_types::{percent_encode, BoxRepo, Changeset, NodeHash, Parents, Repo, NULL_HASH};
|
||||||
|
|
||||||
use hgproto::{self, GetbundleArgs, HgCommandRes, HgCommands};
|
use hgproto::{self, GetbundleArgs, HgCommandRes, HgCommands};
|
||||||
|
|
||||||
use fileheads::FileHeads;
|
|
||||||
use filebookmarks::FileBookmarks;
|
|
||||||
use fileblob::Fileblob;
|
|
||||||
use rocksblob::Rocksblob;
|
|
||||||
use blobrepo::BlobRepo;
|
use blobrepo::BlobRepo;
|
||||||
|
use fileblob::Fileblob;
|
||||||
|
use filebookmarks::FileBookmarks;
|
||||||
|
use fileheads::FileHeads;
|
||||||
|
use rocksblob::Rocksblob;
|
||||||
|
|
||||||
use errors::Result;
|
use errors::Result;
|
||||||
|
|
||||||
@ -49,8 +49,8 @@ impl RepoType {
|
|||||||
use self::RepoType::*;
|
use self::RepoType::*;
|
||||||
use hgproto::{Error, ErrorKind};
|
use hgproto::{Error, ErrorKind};
|
||||||
|
|
||||||
fn repo_chain<E: ChainedError>(err: E) -> Error {
|
fn repo_chain<E: error::Error + Send + 'static>(err: E) -> Error {
|
||||||
ChainedError::with_chain(err, ErrorKind::Repo)
|
Error::with_chain(err, ErrorKind::Repo)
|
||||||
}
|
}
|
||||||
|
|
||||||
let ret = match *self {
|
let ret = match *self {
|
||||||
|
Loading…
Reference in New Issue
Block a user