From 2a6945a534f263eb8e24fff9be31c5c4be09a063 Mon Sep 17 00:00:00 2001 From: core Date: Sun, 24 Sep 2023 20:20:14 -0400 Subject: [PATCH] mystery changes --- nebula-ffi/build.rs | 9 ++++----- nebula-ffi/src/lib.rs | 2 +- tfcli/src/role.rs | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nebula-ffi/build.rs b/nebula-ffi/build.rs index a085aba..c95c6ff 100644 --- a/nebula-ffi/build.rs +++ b/nebula-ffi/build.rs @@ -7,13 +7,12 @@ use std::path::Path; fn main() { // Find compiler: if /usr/local/go/bin/go exists, use that // otherwise, rely on PATH - let compiler; - if Path::new("/usr/local/go/bin/go").exists() { + let compiler = if Path::new("/usr/local/go/bin/go").exists() { println!("Using /usr/local/go/bin/go"); - compiler = "/usr/local/go/bin/go"; + "/usr/local/go/bin/go" } else { - compiler = "go"; - } + "go" + }; gobuild::Build::new().compiler(compiler).buildmode(BuildMode::CArchive).file("main.go").compile("nebulaffi"); diff --git a/nebula-ffi/src/lib.rs b/nebula-ffi/src/lib.rs index dbe4d50..f16e16b 100644 --- a/nebula-ffi/src/lib.rs +++ b/nebula-ffi/src/lib.rs @@ -1,5 +1,5 @@ //! # nebula-ffi -//! nebula-ffi is a crate for interacting with the Nebula project via a CGo compatability layer. +//! nebula-ffi is a crate for interacting with the Nebula project via a `CGo` compatability layer. //! It provides support for running a Nebula VPN directly from a Rust binary, liken to how the default //! `nebula` binary functions. //! ## Versioning diff --git a/tfcli/src/role.rs b/tfcli/src/role.rs index 5bbde84..a6ffd9c 100644 --- a/tfcli/src/role.rs +++ b/tfcli/src/role.rs @@ -160,7 +160,7 @@ pub async fn create_role(name: String, description: String, rules_json: String, let token = format!("{} {}", session_token, auth_token); - let res = client.post(server.join(&format!("/v1/roles"))?).json(&RoleCreateBody { + let res = client.post(server.join("/v1/roles")?).json(&RoleCreateBody { name, description, firewall_rules: rules,