Skip to content

Commit dce83cb

Browse files
chore Fix clippy lints
1 parent 9f49f03 commit dce83cb

File tree

66 files changed

+93
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+93
-56
lines changed

crates/boop-parser/src/generated_parser/accounts_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl yellowstone_vixen_core::Parser for AccountParser {
7575
type Input = yellowstone_vixen_core::AccountUpdate;
7676
type Output = BoopProgramState;
7777

78-
fn id(&self) -> std::borrow::Cow<str> { "boop::AccountParser".into() }
78+
fn id(&self) -> std::borrow::Cow<'static, str> { "boop::AccountParser".into() }
7979

8080
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
8181
yellowstone_vixen_core::Prefilter::builder()

crates/boop-parser/src/generated_parser/instructions_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl yellowstone_vixen_core::Parser for InstructionParser {
102102
#[cfg(feature = "shared-data")]
103103
type Output = InstructionUpdateOutput<BoopProgramIx>;
104104

105-
fn id(&self) -> std::borrow::Cow<str> { "Boop::InstructionParser".into() }
105+
fn id(&self) -> std::borrow::Cow<'static, str> { "Boop::InstructionParser".into() }
106106

107107
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
108108
yellowstone_vixen_core::Prefilter::builder()

crates/boop-parser/src/generated_sdk/errors/boop.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ pub enum BoopError {
113113
Unauthorized = 0x1790,
114114
}
115115

116+
#[allow(deprecated)]
116117
impl solana_program_error::PrintProgramError for BoopError {
117118
fn print<E>(&self) {
118119
solana_msg::msg!(&self.to_string());
119120
}
120121
}
121122

123+
#[allow(deprecated)]
122124
impl<T> solana_decode_error::DecodeError<T> for BoopError {
123125
fn type_of() -> &'static str { "BoopError" }
124126
}

crates/core/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub trait Parser {
100100
/// name of the parser. However, for parsers that produce a different
101101
/// prefilter depending on some internal configuration, instances that
102102
/// output differing prefilters _must_ output different IDs.
103-
fn id(&self) -> Cow<str>;
103+
fn id(&self) -> Cow<'static, str>;
104104

105105
/// Filter data passed to Yellowstone to coarsely narrow down updates
106106
/// to values parseable by this parser.
@@ -119,17 +119,17 @@ pub trait ProgramParser: Parser {
119119
/// Helper trait for getting the ID of a parser.
120120
pub trait ParserId {
121121
/// Get the ID of this parser, see [`Parser::id`].
122-
fn id(&self) -> Cow<str>;
122+
fn id(&self) -> Cow<'static, str>;
123123
}
124124

125125
impl ParserId for std::convert::Infallible {
126126
#[inline]
127-
fn id(&self) -> Cow<str> { match *self {} }
127+
fn id(&self) -> Cow<'static, str> { match *self {} }
128128
}
129129

130130
impl<T: Parser> ParserId for T {
131131
#[inline]
132-
fn id(&self) -> Cow<str> { Parser::id(self) }
132+
fn id(&self) -> Cow<'static, str> { Parser::id(self) }
133133
}
134134

135135
/// Helper trait for getting the prefilter of a parser.

crates/core/src/proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ where T::Input: Sync
8484
type Output = T::Message;
8585

8686
#[inline]
87-
fn id(&self) -> std::borrow::Cow<str> { self.0.id() }
87+
fn id(&self) -> std::borrow::Cow<'static, str> { self.0.id() }
8888

8989
#[inline]
9090
fn prefilter(&self) -> crate::Prefilter { self.0.prefilter() }

crates/jupiter-swap-parser/src/generated_parser/accounts_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl yellowstone_vixen_core::Parser for AccountParser {
6060
type Input = yellowstone_vixen_core::AccountUpdate;
6161
type Output = JupiterProgramState;
6262

63-
fn id(&self) -> std::borrow::Cow<str> { "jupiter::AccountParser".into() }
63+
fn id(&self) -> std::borrow::Cow<'static, str> { "jupiter::AccountParser".into() }
6464

6565
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
6666
yellowstone_vixen_core::Prefilter::builder()

crates/jupiter-swap-parser/src/generated_parser/instructions_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl yellowstone_vixen_core::Parser for InstructionParser {
7777
#[cfg(feature = "shared-data")]
7878
type Output = InstructionUpdateOutput<JupiterProgramIx>;
7979

80-
fn id(&self) -> std::borrow::Cow<str> { "Jupiter::InstructionParser".into() }
80+
fn id(&self) -> std::borrow::Cow<'static, str> { "Jupiter::InstructionParser".into() }
8181

8282
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
8383
yellowstone_vixen_core::Prefilter::builder()

crates/jupiter-swap-parser/src/generated_sdk/errors/jupiter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ pub enum JupiterError {
6969
SourceAndDestinationMintCannotBeTheSame = 0x1782,
7070
}
7171

72+
#[allow(deprecated)]
7273
impl solana_program_error::PrintProgramError for JupiterError {
7374
fn print<E>(&self) {
7475
solana_msg::msg!(&self.to_string());
7576
}
7677
}
7778

79+
#[allow(deprecated)]
7880
impl<T> solana_decode_error::DecodeError<T> for JupiterError {
7981
fn type_of() -> &'static str { "JupiterError" }
8082
}

crates/kamino-limit-orders-parser/src/generated_parser/accounts_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl yellowstone_vixen_core::Parser for AccountParser {
7171
type Input = yellowstone_vixen_core::AccountUpdate;
7272
type Output = LimoProgramState;
7373

74-
fn id(&self) -> std::borrow::Cow<str> { "limo::AccountParser".into() }
74+
fn id(&self) -> std::borrow::Cow<'static, str> { "limo::AccountParser".into() }
7575

7676
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
7777
yellowstone_vixen_core::Prefilter::builder()

crates/kamino-limit-orders-parser/src/generated_parser/instructions_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl yellowstone_vixen_core::Parser for InstructionParser {
6565
#[cfg(feature = "shared-data")]
6666
type Output = InstructionUpdateOutput<LimoProgramIx>;
6767

68-
fn id(&self) -> std::borrow::Cow<str> { "Limo::InstructionParser".into() }
68+
fn id(&self) -> std::borrow::Cow<'static, str> { "Limo::InstructionParser".into() }
6969

7070
fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
7171
yellowstone_vixen_core::Prefilter::builder()

0 commit comments

Comments
 (0)