File tree 7 files changed +271
-142
lines changed
7 files changed +271
-142
lines changed Original file line number Diff line number Diff line change @@ -73,35 +73,6 @@ impl From<String> for ApiGenError {
73
73
}
74
74
75
75
impl api:: Endpoint {
76
- /// Get the Rust doc comment for this endpoint.
77
- ///
78
- /// This is the `documentation` value formatted as a Rust doc comment.
79
- pub fn get_doc ( & self ) -> Attribute {
80
- Spanned {
81
- span : DUMMY_SP ,
82
- node : Attribute_ {
83
- id : AttrId ( 0 ) ,
84
- style : AttrStyle :: Inner ,
85
- value : P ( Spanned {
86
- span : DUMMY_SP ,
87
- node : MetaItemKind :: NameValue (
88
- token:: InternedString :: new ( "" ) ,
89
- Spanned {
90
- span : DUMMY_SP ,
91
- node : LitKind :: Str (
92
- token:: InternedString :: new_from_name (
93
- token:: intern ( & format ! ( "//! {}" , self . documentation) )
94
- ) ,
95
- StrStyle :: Cooked
96
- )
97
- }
98
- )
99
- } ) ,
100
- is_sugared_doc : true
101
- }
102
- }
103
- }
104
-
105
76
/// Gets the name of the Endpoint if it's set or returns an empty string.
106
77
pub fn get_name < ' a > ( & ' a self ) -> & ' a str {
107
78
match self . name {
Original file line number Diff line number Diff line change @@ -102,27 +102,6 @@ fn can_get_api_type_as_rust_type() {
102
102
assert ! ( success) ;
103
103
}
104
104
105
- #[ test]
106
- fn can_get_rust_doc_comment_for_endpoint ( ) {
107
- let endpoint = Endpoint {
108
- name : None ,
109
- documentation : "My docs" . to_string ( ) ,
110
- methods : Vec :: new ( ) ,
111
- body : None ,
112
- url : Url {
113
- path : String :: new ( ) ,
114
- paths : Vec :: new ( ) ,
115
- parts : BTreeMap :: new ( ) ,
116
- params : BTreeMap :: new ( )
117
- }
118
- } ;
119
-
120
- let docs = endpoint. get_doc ( ) ;
121
-
122
- //TODO: Get the '///' or '//!' prepended
123
- assert_eq ! ( "//! My docs" , pprust:: attr_to_string( & docs) ) ;
124
- }
125
-
126
105
#[ test]
127
106
fn can_get_mod_name_for_endpoint ( ) {
128
107
let endpoint = Endpoint {
You can’t perform that action at this time.
0 commit comments