File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,7 @@ check: ## Build all code in suitable configurations
73
73
&& cargo check --features verbose-object-parsing-errors
74
74
cd git-index && cargo check --features serde1
75
75
cd git-credentials && cargo check --features serde1
76
- cd git-sec && cargo check --features serde1 \
77
- cargo check --features thiserror
76
+ cd git-sec && cargo check --features serde1
78
77
cd git-revision && cargo check --features serde1
79
78
cd git-attributes && cargo check --features serde1
80
79
cd git-glob && cargo check --features serde1
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl Cache {
80
80
"HOME" => Some ( home_env) ,
81
81
_ => None ,
82
82
}
83
- . and_then ( |perm| std:: env:: var_os ( name) . and_then ( |val| perm. check ( val) . ok ( ) . flatten ( ) ) )
83
+ . and_then ( |perm| std:: env:: var_os ( name) . and_then ( |val| perm. check_opt ( val) ) )
84
84
} )
85
85
. map ( |p| ( source, p. into_owned ( ) ) )
86
86
}
@@ -189,6 +189,6 @@ impl Cache {
189
189
pub fn home_dir ( & self ) -> Option < PathBuf > {
190
190
std:: env:: var_os ( "HOME" )
191
191
. map ( PathBuf :: from)
192
- . and_then ( |path| self . home_env . check ( path) . ok ( ) . flatten ( ) )
192
+ . and_then ( |path| self . home_env . check_opt ( path) )
193
193
}
194
194
}
Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ impl ThreadSafeRepository {
356
356
let git_install_dir = crate :: path:: install_dir ( ) . ok ( ) ;
357
357
let home = std:: env:: var_os ( "HOME" )
358
358
. map ( PathBuf :: from)
359
- . and_then ( |home| env. home . check ( home) . ok ( ) . flatten ( ) ) ;
359
+ . and_then ( |home| env. home . check_opt ( home) ) ;
360
360
361
361
let mut filter_config_section = filter_config_section. unwrap_or ( config:: section:: is_trusted) ;
362
362
let config = config:: Cache :: from_stage_one (
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl SchemePermission {
103
103
104
104
let user_allowed = saw_user. then ( || {
105
105
std:: env:: var_os ( "GIT_PROTOCOL_FROM_USER" )
106
- . and_then ( |val| git_prefix. check ( val) . ok ( ) . flatten ( ) )
106
+ . and_then ( |val| git_prefix. check_opt ( val) )
107
107
. map_or ( true , |val| val == "1" )
108
108
} ) ;
109
109
Ok ( SchemePermission {
You can’t perform that action at this time.
0 commit comments