File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ pub struct HttpRubyGemsClient {
3636 base_url : String ,
3737}
3838
39+ impl Default for HttpRubyGemsClient {
40+ fn default ( ) -> Self {
41+ Self :: new ( )
42+ }
43+ }
44+
3945impl HttpRubyGemsClient {
4046 const DEFAULT_BASE_URL : & ' static str = "https://rubygems.org/api/v1/gems" ;
4147
@@ -84,6 +90,12 @@ pub struct RubyDiscoverer<F: RubyGemsFetcher> {
8490 fetcher : F ,
8591}
8692
93+ impl Default for RubyDiscoverer < HttpRubyGemsClient > {
94+ fn default ( ) -> Self {
95+ Self :: new ( )
96+ }
97+ }
98+
8799impl RubyDiscoverer < HttpRubyGemsClient > {
88100 pub fn new ( ) -> Self {
89101 Self {
@@ -162,7 +174,7 @@ fn read_gemfile_lock(project_root: &Path) -> Result<Vec<String>, RubyDiscoveryEr
162174 if !line. starts_with ( ' ' ) && !line. starts_with ( '\t' ) {
163175 break ;
164176 }
165- if let Some ( name) = line. trim ( ) . split_whitespace ( ) . next ( ) {
177+ if let Some ( name) = line. split_whitespace ( ) . next ( ) {
166178 if let Some ( normalized) = normalize_dependency_name ( name) {
167179 names. push ( normalized) ;
168180 }
You can’t perform that action at this time.
0 commit comments