diff options
| author | Rune Tynan <runetynan@gmail.com> | 2021-02-08 16:04:14 -0500 |
|---|---|---|
| committer | Rune Tynan <runetynan@gmail.com> | 2021-02-08 16:04:14 -0500 |
| commit | 0a91daeaa33e4ae71e0be405cdddba741b72aa7f (patch) | |
| tree | 2c4aa47745f44ff949c9d186163b2701c135bd8e /src/rustdoc-json-types | |
| parent | ce02b7f7a6f554dbf80b7cabc09c3d84d92d0c3a (diff) | |
| download | rust-0a91daeaa33e4ae71e0be405cdddba741b72aa7f.tar.gz rust-0a91daeaa33e4ae71e0be405cdddba741b72aa7f.zip | |
Vec -> HashSet
Diffstat (limited to 'src/rustdoc-json-types')
| -rw-r--r-- | src/rustdoc-json-types/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 20bae0f14a2..a2f323699c1 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -3,7 +3,7 @@ //! These types are the public API exposed through the `--output-format json` flag. The [`Crate`] //! struct is the root of the JSON blob and all other items are contained within. -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::path::PathBuf; use serde::{Deserialize, Serialize}; @@ -282,7 +282,7 @@ pub enum StructType { } #[non_exhaustive] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] #[serde(rename_all = "snake_case")] pub enum Modifiers { Const, @@ -294,7 +294,7 @@ pub enum Modifiers { pub struct Function { pub decl: FnDecl, pub generics: Generics, - pub header: Vec<Modifiers>, + pub header: HashSet<Modifiers>, pub abi: String, } @@ -302,7 +302,7 @@ pub struct Function { pub struct Method { pub decl: FnDecl, pub generics: Generics, - pub header: Vec<Modifiers>, + pub header: HashSet<Modifiers>, pub abi: String, pub has_body: bool, } @@ -415,7 +415,7 @@ pub enum Type { pub struct FunctionPointer { pub decl: FnDecl, pub generic_params: Vec<GenericParamDef>, - pub header: Vec<Modifiers>, + pub header: HashSet<Modifiers>, pub abi: String, } |
