Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code #1410

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion soroban-sdk/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,13 @@ impl IntoIterator for Bytes {
pub struct BytesIter(Bytes);

impl BytesIter {
fn into_bin(self) -> Bytes {
pub fn into_bytes(self) -> Bytes {
self.0
}

pub fn to_bytes(&self) -> Bytes {
self.0.clone()
}
}

impl Iterator for BytesIter {
Expand Down
3 changes: 0 additions & 3 deletions soroban-sdk/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ use core::fmt::Debug;
use crate::{contracttype, Bytes, Map};
use crate::{env::internal, unwrap::UnwrapInfallible, Env, IntoVal, Val, Vec};

// TODO: consolidate with host::events::TOPIC_BYTES_LENGTH_LIMIT
const TOPIC_BYTES_LENGTH_LIMIT: u32 = 32;

/// Events publishes events for the currently executing contract.
///
/// ```
Expand Down
1 change: 0 additions & 1 deletion soroban-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@

#![cfg_attr(target_family = "wasm", no_std)]
#![cfg_attr(feature = "docs", feature(doc_cfg))]
#![allow(dead_code)]
// The SDK uses #[test] in doctests, and does some sneaky line hiding to have
// the doctest execute the test inside a main function instead.
#![allow(clippy::test_attr_in_doctest)]
Expand Down
5 changes: 0 additions & 5 deletions soroban-sdk/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,6 @@ impl<K, V> Map<K, V> {
self.obj.to_val()
}

#[inline(always)]
pub(crate) fn as_object(&self) -> &MapObject {
&self.obj
}

#[inline(always)]
pub(crate) fn to_object(&self) -> MapObject {
self.obj
Expand Down
6 changes: 5 additions & 1 deletion soroban-sdk/src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,11 @@ impl<T> VecTryIter<T> {
}
}

fn into_vec(self) -> Vec<T> {
pub fn into_vec(self) -> Vec<T> {
self.to_vec()
}

pub fn to_vec(&self) -> Vec<T> {
self.vec.slice(self.start..self.end)
}
}
Expand Down
Loading