From f087f538f3f64f1b096353c835aa1277c78faa0c Mon Sep 17 00:00:00 2001 From: wangmengc Date: Mon, 3 Jun 2024 10:01:39 +0800 Subject: [PATCH] add depencedepence and license for r_input --- utshell-0.5/r_input/Cargo.toml | 7 +++++++ utshell-0.5/r_input/src/lib.rs | 23 +++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/utshell-0.5/r_input/Cargo.toml b/utshell-0.5/r_input/Cargo.toml index 3ecf3b51..34a6bdf7 100644 --- a/utshell-0.5/r_input/Cargo.toml +++ b/utshell-0.5/r_input/Cargo.toml @@ -6,3 +6,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +libc = "*" +rcommon = {path = "../builtins_rust/common"} +r_bash = {path = "../r_bash"} + +[lib] +name = "r_input" +crate-type = ["staticlib","rlib"] diff --git a/utshell-0.5/r_input/src/lib.rs b/utshell-0.5/r_input/src/lib.rs index 7d12d9af..b7606311 100644 --- a/utshell-0.5/r_input/src/lib.rs +++ b/utshell-0.5/r_input/src/lib.rs @@ -1,14 +1,13 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -#[cfg(test)] -mod tests { - use super::*; +//# SPDX-License-Identifier: GPL-3.0-or-later - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} +#![allow( + dead_code, + mutable_transmutes, + non_camel_case_types, + non_snake_case, + non_upper_case_globals, + unused_assignments, + unused_mut +)] -- Gitee