@@ -17,7 +17,7 @@ struct UrlPattern(deno_urlpattern::UrlPattern);
1717impl UrlPattern {
1818 #[ new]
1919 #[ pyo3( signature = ( input=None , baseURL=None , options=None ) ) ]
20- pub fn new (
20+ fn new (
2121 input : Option < UrlPatternInput > ,
2222 baseURL : Option < & Bound < ' _ , PyAny > > ,
2323 options : Option < & Bound < ' _ , PyDict > > ,
@@ -66,7 +66,7 @@ impl UrlPattern {
6666 ) )
6767 }
6868
69- pub fn __repr__ ( & self , py : Python ) -> String {
69+ fn __repr__ ( & self , py : Python ) -> String {
7070 let dict = PyDict :: new ( py) ;
7171 dict. set_item ( "protocol" , self . 0 . protocol ( ) ) . unwrap ( ) ;
7272 dict. set_item ( "username" , self . 0 . username ( ) ) . unwrap ( ) ;
@@ -81,7 +81,7 @@ impl UrlPattern {
8181 }
8282
8383 #[ pyo3( signature = ( input=None , baseURL=None ) ) ]
84- pub fn test ( & self , input : Option < UrlPatternInput > , baseURL : Option < & str > ) -> PyResult < bool > {
84+ fn test ( & self , input : Option < UrlPatternInput > , baseURL : Option < & str > ) -> PyResult < bool > {
8585 let string_or_init_input = match input {
8686 Some ( input) => deno_urlpattern:: quirks:: StringOrInit :: try_from ( input) ?,
8787 None => deno_urlpattern:: quirks:: StringOrInit :: Init (
@@ -98,7 +98,7 @@ impl UrlPattern {
9898 }
9999
100100 #[ pyo3( signature = ( input=None , baseURL=None ) ) ]
101- pub fn exec (
101+ fn exec (
102102 & self ,
103103 input : Option < UrlPatternInput > ,
104104 baseURL : Option < & str > ,
@@ -157,53 +157,53 @@ impl UrlPattern {
157157 }
158158
159159 #[ getter]
160- pub fn protocol ( & self ) -> PyResult < & str > {
160+ fn protocol ( & self ) -> PyResult < & str > {
161161 Ok ( self . 0 . protocol ( ) )
162162 }
163163
164164 #[ getter]
165- pub fn username ( & self ) -> PyResult < & str > {
165+ fn username ( & self ) -> PyResult < & str > {
166166 Ok ( self . 0 . username ( ) )
167167 }
168168
169169 #[ getter]
170- pub fn password ( & self ) -> PyResult < & str > {
170+ fn password ( & self ) -> PyResult < & str > {
171171 Ok ( self . 0 . password ( ) )
172172 }
173173
174174 #[ getter]
175- pub fn hostname ( & self ) -> PyResult < & str > {
175+ fn hostname ( & self ) -> PyResult < & str > {
176176 Ok ( self . 0 . hostname ( ) )
177177 }
178178
179179 #[ getter]
180- pub fn port ( & self ) -> PyResult < & str > {
180+ fn port ( & self ) -> PyResult < & str > {
181181 Ok ( self . 0 . port ( ) )
182182 }
183183
184184 #[ getter]
185- pub fn pathname ( & self ) -> PyResult < & str > {
185+ fn pathname ( & self ) -> PyResult < & str > {
186186 Ok ( self . 0 . pathname ( ) )
187187 }
188188
189189 #[ getter]
190- pub fn search ( & self ) -> PyResult < & str > {
190+ fn search ( & self ) -> PyResult < & str > {
191191 Ok ( self . 0 . search ( ) )
192192 }
193193
194194 #[ getter]
195- pub fn hash ( & self ) -> PyResult < & str > {
195+ fn hash ( & self ) -> PyResult < & str > {
196196 Ok ( self . 0 . hash ( ) )
197197 }
198198
199199 #[ getter( hasRegExpGroups) ]
200- pub fn has_regexp_groups ( & self ) -> PyResult < bool > {
200+ fn has_regexp_groups ( & self ) -> PyResult < bool > {
201201 Ok ( self . 0 . has_regexp_groups ( ) )
202202 }
203203}
204204
205205#[ derive( FromPyObject ) ]
206- pub enum UrlPatternInput < ' py > {
206+ enum UrlPatternInput < ' py > {
207207 String ( String ) ,
208208 Init ( Bound < ' py , PyDict > ) ,
209209}
@@ -260,19 +260,19 @@ impl<'py> TryFrom<UrlPatternInput<'py>> for deno_urlpattern::quirks::StringOrIni
260260 }
261261}
262262
263- pub struct UrlPatternResult {
264- pub inputs : (
263+ struct UrlPatternResult {
264+ inputs : (
265265 deno_urlpattern:: quirks:: StringOrInit < ' static > ,
266266 Option < String > ,
267267 ) ,
268- pub protocol : UrlPatternComponentResult ,
269- pub username : UrlPatternComponentResult ,
270- pub password : UrlPatternComponentResult ,
271- pub hostname : UrlPatternComponentResult ,
272- pub port : UrlPatternComponentResult ,
273- pub pathname : UrlPatternComponentResult ,
274- pub search : UrlPatternComponentResult ,
275- pub hash : UrlPatternComponentResult ,
268+ protocol : UrlPatternComponentResult ,
269+ username : UrlPatternComponentResult ,
270+ password : UrlPatternComponentResult ,
271+ hostname : UrlPatternComponentResult ,
272+ port : UrlPatternComponentResult ,
273+ pathname : UrlPatternComponentResult ,
274+ search : UrlPatternComponentResult ,
275+ hash : UrlPatternComponentResult ,
276276}
277277
278278impl < ' py > IntoPyObject < ' py > for UrlPatternResult {
@@ -343,12 +343,12 @@ impl<'py> IntoPyObject<'py> for UrlPatternResult {
343343}
344344
345345#[ derive( IntoPyObject , IntoPyObjectRef ) ]
346- pub struct UrlPatternComponentResult {
346+ struct UrlPatternComponentResult {
347347 input : String ,
348348 groups : HashMap < String , Option < String > > ,
349349}
350350
351- pub struct Error ( deno_urlpattern:: Error ) ;
351+ struct Error ( deno_urlpattern:: Error ) ;
352352
353353impl From < Error > for PyErr {
354354 fn from ( error : Error ) -> Self {
0 commit comments