Skip to content

Commit 6e4f334

Browse files
author
Virgiel
committed
More ergonomic API
1 parent 7ac1025 commit 6e4f334

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cornucopia/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ pub fn run() -> Result<(), Error> {
6868
Action::Schema { schema_files } => {
6969
// Run the generate command. If the command is unsuccessful, cleanup Cornucopia's container
7070
if let Err(e) = generate_managed(
71-
&queries_path,
71+
queries_path,
7272
&schema_files,
73-
Some(&destination),
73+
Some(destination),
7474
podman,
7575
CodegenSettings {
7676
is_async: !sync,

cornucopia/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod conn;
1414
/// High-level interfaces to work with Cornucopia's container manager.
1515
pub mod container;
1616

17-
use std::path::{Path, PathBuf};
17+
use std::path::Path;
1818

1919
use postgres::Client;
2020

@@ -72,7 +72,7 @@ pub fn generate_live<P: AsRef<Path>>(
7272
/// `podman` parameter to `true`.
7373
pub fn generate_managed<P: AsRef<Path>>(
7474
queries_path: P,
75-
schema_files: &[PathBuf],
75+
schema_files: &[P],
7676
destination: Option<P>,
7777
podman: bool,
7878
settings: CodegenSettings,

examples/auto_build/_build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() -> Result<(), Error> {
1717
println!("cargo:rerun-if-changed={schema_file}");
1818
cornucopia::generate_managed(
1919
queries_path,
20-
&[schema_file.into()],
20+
&[schema_file],
2121
Some(destination),
2222
false,
2323
settings,

0 commit comments

Comments
 (0)