Skip to content

Commit

Permalink
Use .cargo/config.toml instead of .cargo/config
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Oct 13, 2022
1 parent e6feb69 commit 235727d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions cargo-pgx/src/command/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub(crate) fn create_crate_template(
create_directory_structure(&path)?;
create_control_file(&path, name)?;
create_cargo_toml(&path, name)?;
create_dotcargo_config(&path, name)?;
create_dotcargo_config_toml(&path, name)?;
create_lib_rs(&path, name, is_bgworker)?;
create_git_ignore(&path, name)?;

Expand Down Expand Up @@ -98,14 +98,14 @@ fn create_cargo_toml(path: &PathBuf, name: &str) -> Result<(), std::io::Error> {
Ok(())
}

fn create_dotcargo_config(path: &PathBuf, _name: &str) -> Result<(), std::io::Error> {
fn create_dotcargo_config_toml(path: &PathBuf, _name: &str) -> Result<(), std::io::Error> {
let mut filename = path.clone();

filename.push(".cargo");
filename.push("config");
filename.push("config.toml");
let mut file = std::fs::File::create(filename)?;

file.write_all(include_bytes!("../templates/cargo_config"))?;
file.write_all(include_bytes!("../templates/cargo_config_toml"))?;

Ok(())
}
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 235727d

Please sign in to comment.