Skip to content

Commit

Permalink
Token: Add dead code to silence clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
--local committed Sep 20, 2023
1 parent 72c6302 commit 98bd9a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/token/src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use soroban_sdk::{Address, Env};

use crate::storage_types::DataKey;

#[allow(dead_code)]
pub fn has_administrator(e: &Env) -> bool {
let key = DataKey::Admin;
e.storage().instance().has(&key)
Expand Down
3 changes: 3 additions & 0 deletions contracts/token/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct Token;

#[contractimpl]
impl Token {
#[allow(dead_code)]
pub fn initialize(e: Env, admin: Address, decimal: u32, name: String, symbol: String) {
if has_administrator(&e) {
panic!("already initialized")
Expand All @@ -40,6 +41,7 @@ impl Token {
)
}

#[allow(dead_code)]
pub fn mint(e: Env, to: Address, amount: i128) {
check_nonnegative_amount(amount);
let admin = read_administrator(&e);
Expand All @@ -53,6 +55,7 @@ impl Token {
TokenUtils::new(&e).events().mint(admin, to, amount);
}

#[allow(dead_code)]
pub fn set_admin(e: Env, new_admin: Address) {
let admin = read_administrator(&e);
admin.require_auth();
Expand Down

0 comments on commit 98bd9a3

Please sign in to comment.