Skip to content

Commit

Permalink
cleaning up PR
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Jan 8, 2024
1 parent c5daacb commit 3cffbe2
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion docs/reference/src/code/operations/assertions/src/lib.sw
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
library;

mod req;
use core::codec::*;

#[allow(dead_code)]
// ANCHOR: assert
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/src/code/operations/assertions/src/req.sw
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library;

use core::codec::*;

// ANCHOR: require
fn subtract(a: u64, b: u64) -> u64 {
require(b <= a, "b is too large");
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/src/code/operations/call_data/src/lib.sw
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library;

use core::codec::*;

// ANCHOR: import_asset
use std::{call_frames::msg_asset_id, constants::BASE_ASSET_ID};
// ANCHOR_END: import_asset
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/src/code/operations/logging/src/lib.sw
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library;

use core::codec::*;

// ANCHOR: logging
fn log_data(number: u64) {
// generic T = `number` of type `u64`
Expand Down
1 change: 1 addition & 0 deletions sway-lib-core/src/prelude.sw
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ use ::never::*;
use ::ops::*;
use ::storage::*;
use ::str::*;
use ::codec::*;
3 changes: 1 addition & 2 deletions sway-lib-std/src/assert.sw
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ library;
use ::logging::log;
use ::revert::revert;
use ::error_signals::{FAILED_ASSERT_EQ_SIGNAL, FAILED_ASSERT_NE_SIGNAL, FAILED_ASSERT_SIGNAL};
use core::codec::*;

/// Asserts that the given `condition` will always be `true` during runtime.
///
Expand Down Expand Up @@ -89,7 +88,7 @@ where
/// ```
pub fn assert_ne<T>(v1: T, v2: T)
where
T: Eq,
T: Eq + AbiEncode,
{
if (v1 == v2) {
log(v1);
Expand Down

0 comments on commit 3cffbe2

Please sign in to comment.