Implement `is_empty` for `AllowedLibPaths` (#777)

* pub svm_compile

* empty allowed paths
This commit is contained in:
brockelmore 2022-01-08 17:20:28 -05:00 committed by GitHub
parent 270fe46d37
commit 1287614e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -550,6 +550,12 @@ impl ArtifactOutput for MinimalCombinedArtifactsHardhatFallback {
#[derive(Clone, Debug, Default)]
pub struct AllowedLibPaths(pub(crate) Vec<PathBuf>);
impl AllowedLibPaths {
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
}
impl fmt::Display for AllowedLibPaths {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let lib_paths = self