mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Account for possibly empty license_template_path
Don't attempt to load license_template if the path wasn't specified.
This commit is contained in:
parent
ead81205cc
commit
e48d7f3ebb
@ -392,6 +392,7 @@ macro_rules! create_config {
|
||||
}
|
||||
|
||||
fn set_license_template(&mut self) {
|
||||
if self.was_set().license_template_path() {
|
||||
let license_template_path = self.license_template_path();
|
||||
let mut license_template_file = match File::open(&license_template_path) {
|
||||
Ok(file) => file,
|
||||
@ -425,6 +426,7 @@ macro_rules! create_config {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Template for the default configuration
|
||||
impl Default for Config {
|
||||
|
Loading…
Reference in New Issue
Block a user