Skip to content

Commit e0236f9

Browse files
committed
drop anchor feature
1 parent f83ecc0 commit e0236f9

File tree

8 files changed

+16
-34
lines changed

8 files changed

+16
-34
lines changed

clients/rust/src/generated/accounts/config.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,3 @@ impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for Config {
3838
Self::deserialize(&mut data)
3939
}
4040
}
41-
42-
#[cfg(feature = "anchor")]
43-
impl anchor_lang::AccountDeserialize for Config {
44-
fn try_deserialize_unchecked(buf: &mut &[u8]) -> anchor_lang::Result<Self> {
45-
Ok(Self::deserialize(buf)?)
46-
}
47-
}
48-
49-
#[cfg(feature = "anchor")]
50-
impl anchor_lang::AccountSerialize for Config {}
51-
52-
#[cfg(feature = "anchor")]
53-
impl anchor_lang::Owner for Config {
54-
fn owner() -> Pubkey {
55-
crate::SOLANA_CONFIG_ID
56-
}
57-
}
58-
59-
#[cfg(feature = "anchor-idl-build")]
60-
impl anchor_lang::IdlBuild for Config {}
61-
62-
#[cfg(feature = "anchor-idl-build")]
63-
impl anchor_lang::Discriminator for Config {
64-
const DISCRIMINATOR: [u8; 8] = [0; 8];
65-
}

clients/rust/src/generated/instructions/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl<'a, 'b> StoreCpi<'a, 'b> {
228228
accounts,
229229
data,
230230
};
231-
let mut account_infos = Vec::with_capacity(1 + 1 + remaining_accounts.len());
231+
let mut account_infos = Vec::with_capacity(2 + remaining_accounts.len());
232232
account_infos.push(self.__program.clone());
233233
account_infos.push(self.config_account.0.clone());
234234
remaining_accounts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"devDependencies": {
2828
"@codama/renderers-js": "^1.0.0",
29-
"@codama/renderers-rust": "^1.0.1",
29+
"@codama/renderers-rust": "^1.0.3",
3030
"@iarna/toml": "^2.2.5",
3131
"codama": "^1.0.0",
3232
"typescript": "^5.5.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

program/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ crate-type = ["cdylib", "lib"]
3131
[[bench]]
3232
name = "compute_units"
3333
harness = false
34+
35+
[lints.rust.unexpected_cfgs]
36+
level = "warn"
37+
check-cfg = [
38+
'cfg(target_os, values("solana"))',
39+
]

scripts/client/lint-rust.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
// ['--arg1', '--arg2', ...cliArguments()]
1212
const lintArgs = [
1313
'-Zunstable-options',
14+
'--all-features',
1415
'--',
1516
'--deny=warnings',
1617
...cliArguments()

scripts/generate-clients.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ codama.update(deleteNodesVisitor(['[definedTypeNode]configKeys']));
2828
const rustClient = path.join(__dirname, '..', 'clients', 'rust');
2929
codama.accept(
3030
renderRustVisitor(path.join(rustClient, 'src', 'generated'), {
31+
anchorTraits: false,
3132
formatCode: true,
3233
crateFolder: rustClient,
3334
toolchain: getToolchainArgument('format'),

scripts/program/lint.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import {
1313
const lintArgs = [
1414
'-Zunstable-options',
1515
'--all-targets',
16-
'--features',
17-
'bpf-entrypoint,test-sbf',
16+
'--all-features',
1817
'--',
1918
'--deny=warnings',
2019
'--deny=clippy::arithmetic_side_effects',

0 commit comments

Comments
 (0)