Files
heartwood/radicle-tools/src/rad-init.rs
T
Fintan Halpenny 3f48c2c516 Rust 1.67
Rust 1.67 was announced[0]. Update the necessary files for running
1.67 and fix the clippy suggestions for string interpolation.

[0]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-04 19:30:29 +01:00

24 lines
541 B
Rust

use std::path::Path;
use radicle::{git, Profile};
fn main() -> anyhow::Result<()> {
let cwd = Path::new(".").canonicalize()?;
let name = cwd.file_name().unwrap().to_string_lossy().to_string();
let repo = radicle::git::raw::Repository::open(cwd)?;
let profile = Profile::load()?;
let signer = profile.signer()?;
let (id, _, _) = radicle::rad::init(
&repo,
&name,
"",
git::refname!("master"),
&signer,
&profile.storage,
)?;
println!("ok: {id}");
Ok(())
}