This commit is contained in:
ckamm 2023-06-15 09:05:07 +00:00
parent 05a109c79d
commit 2ced312cf7
61 changed files with 150 additions and 116 deletions

View File

@ -1 +1 @@
{"rustc_fingerprint":14716900362882495143,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.65-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":12536241291750731091,"outputs":{"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.65-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""}},"successes":{}}

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Trait to allow a AccountLoader to create an accessor for the full account."><meta name="keywords" content="rust, rustlang, rust-lang, MangoAccountLoader"><title>MangoAccountLoader in mango_v4::state - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../mango_v4/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../mango_v4/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">MangoAccountLoader</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.load_full">load_full</a></li><li><a href="#tymethod.load_full_init">load_full_init</a></li><li><a href="#tymethod.load_full_mut">load_full_mut</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E">&amp;&#39;a AccountLoader&lt;&#39;info, MangoAccountFixed&gt;</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In mango_v4::state</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../mango_v4/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">mango_v4</a>::<wbr><a href="index.html">state</a>::<wbr><a class="trait" href="#">MangoAccountLoader</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/mango_v4/state/mango_account.rs.html#1215-1219">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait MangoAccountLoader&lt;'a&gt; {
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Trait to allow a AccountLoader to create an accessor for the full account."><meta name="keywords" content="rust, rustlang, rust-lang, MangoAccountLoader"><title>MangoAccountLoader in mango_v4::state - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../mango_v4/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../mango_v4/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">MangoAccountLoader</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.load_full">load_full</a></li><li><a href="#tymethod.load_full_init">load_full_init</a></li><li><a href="#tymethod.load_full_mut">load_full_mut</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E">&amp;&#39;a AccountLoader&lt;&#39;info, MangoAccountFixed&gt;</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In mango_v4::state</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../mango_v4/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">mango_v4</a>::<wbr><a href="index.html">state</a>::<wbr><a class="trait" href="#">MangoAccountLoader</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/mango_v4/state/mango_account.rs.html#1232-1236">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait MangoAccountLoader&lt;'a&gt; {
fn <a href="#tymethod.load_full" class="fnname">load_full</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCell.html" title="type mango_v4::state::MangoAccountLoadedRefCell">MangoAccountLoadedRefCell</a>&lt;'a&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.load_full_mut" class="fnname">load_full_mut</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.load_full_init" class="fnname">load_full_init</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;;
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait to allow a AccountLoader<MangoAccountFixed> to create an accessor for the full account.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.load_full" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1216">source</a><h4 class="code-header">fn <a href="#tymethod.load_full" class="fnname">load_full</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCell.html" title="type mango_v4::state::MangoAccountLoadedRefCell">MangoAccountLoadedRefCell</a>&lt;'a&gt;&gt;</h4></div><div id="tymethod.load_full_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1217">source</a><h4 class="code-header">fn <a href="#tymethod.load_full_mut" class="fnname">load_full_mut</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></div><div id="tymethod.load_full_init" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1218">source</a><h4 class="code-header">fn <a href="#tymethod.load_full_init" class="fnname">load_full_init</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></div></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1221-1271">source</a><a href="#impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'a, 'info: 'a&gt; <a class="trait" href="trait.MangoAccountLoader.html" title="trait mango_v4::state::MangoAccountLoader">MangoAccountLoader</a>&lt;'a&gt; for &amp;'a AccountLoader&lt;'info, <a class="struct" href="struct.MangoAccountFixed.html" title="struct mango_v4::state::MangoAccountFixed">MangoAccountFixed</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.load_full" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1222-1237">source</a><a href="#method.load_full" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full" class="fnname">load_full</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCell.html" title="type mango_v4::state::MangoAccountLoadedRefCell">MangoAccountLoadedRefCell</a>&lt;'a&gt;&gt;</h4></section><section id="method.load_full_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1239-1254">source</a><a href="#method.load_full_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full_mut" class="fnname">load_full_mut</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></section><section id="method.load_full_init" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1256-1270">source</a><a href="#method.load_full_init" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full_init" class="fnname">load_full_init</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script src="../../implementors/mango_v4/state/mango_account/trait.MangoAccountLoader.js" data-ignore-extern-crates="anchor_lang" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="mango_v4" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.load_full" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1233">source</a><h4 class="code-header">fn <a href="#tymethod.load_full" class="fnname">load_full</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCell.html" title="type mango_v4::state::MangoAccountLoadedRefCell">MangoAccountLoadedRefCell</a>&lt;'a&gt;&gt;</h4></div><div id="tymethod.load_full_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1234">source</a><h4 class="code-header">fn <a href="#tymethod.load_full_mut" class="fnname">load_full_mut</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></div><div id="tymethod.load_full_init" class="method has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1235">source</a><h4 class="code-header">fn <a href="#tymethod.load_full_init" class="fnname">load_full_init</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></div></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1238-1288">source</a><a href="#impl-MangoAccountLoader%3C%27a%3E-for-%26%27a%20AccountLoader%3C%27info%2C%20MangoAccountFixed%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'a, 'info: 'a&gt; <a class="trait" href="trait.MangoAccountLoader.html" title="trait mango_v4::state::MangoAccountLoader">MangoAccountLoader</a>&lt;'a&gt; for &amp;'a AccountLoader&lt;'info, <a class="struct" href="struct.MangoAccountFixed.html" title="struct mango_v4::state::MangoAccountFixed">MangoAccountFixed</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.load_full" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1239-1254">source</a><a href="#method.load_full" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full" class="fnname">load_full</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCell.html" title="type mango_v4::state::MangoAccountLoadedRefCell">MangoAccountLoadedRefCell</a>&lt;'a&gt;&gt;</h4></section><section id="method.load_full_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1256-1271">source</a><a href="#method.load_full_mut" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full_mut" class="fnname">load_full_mut</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></section><section id="method.load_full_init" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/mango_v4/state/mango_account.rs.html#1273-1287">source</a><a href="#method.load_full_init" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.load_full_init" class="fnname">load_full_init</a>(self) -&gt; Result&lt;<a class="type" href="type.MangoAccountLoadedRefCellMut.html" title="type mango_v4::state::MangoAccountLoadedRefCellMut">MangoAccountLoadedRefCellMut</a>&lt;'a&gt;&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script src="../../implementors/mango_v4/state/mango_account/trait.MangoAccountLoader.js" data-ignore-extern-crates="anchor_lang" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="mango_v4" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -253,9 +253,9 @@
</span>InvalidFlashLoanTargetCpiProgram,
<span class="attribute">#[msg(<span class="string">&quot;health must be positive&quot;</span>)]
</span>HealthMustBePositive,
<span class="attribute">#[msg(<span class="string">&quot;health must be positive or increase&quot;</span>)]
</span>HealthMustBePositiveOrIncrease,
<span class="attribute">#[msg(<span class="string">&quot;health must be negative&quot;</span>)]
<span class="attribute">#[msg(<span class="string">&quot;health must be positive or not decrease&quot;</span>)]
</span>HealthMustBePositiveOrIncrease, <span class="comment">// outdated name is kept for backwards compatibility
</span><span class="attribute">#[msg(<span class="string">&quot;health must be negative&quot;</span>)]
</span>HealthMustBeNegative,
<span class="attribute">#[msg(<span class="string">&quot;the account is bankrupt&quot;</span>)]
</span>IsBankrupt,

View File

@ -1580,6 +1580,23 @@
<span id="1580">1580</span>
<span id="1581">1581</span>
<span id="1582">1582</span>
<span id="1583">1583</span>
<span id="1584">1584</span>
<span id="1585">1585</span>
<span id="1586">1586</span>
<span id="1587">1587</span>
<span id="1588">1588</span>
<span id="1589">1589</span>
<span id="1590">1590</span>
<span id="1591">1591</span>
<span id="1592">1592</span>
<span id="1593">1593</span>
<span id="1594">1594</span>
<span id="1595">1595</span>
<span id="1596">1596</span>
<span id="1597">1597</span>
<span id="1598">1598</span>
<span id="1599">1599</span>
</pre><pre class="rust"><code><span class="kw">use </span>std::cell::{Ref, RefMut};
<span class="kw">use </span>std::mem::size_of;
@ -2618,8 +2635,25 @@
) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="kw">let </span>post_init_health = health_cache.health(HealthType::Init);
<span class="macro">msg!</span>(<span class="string">&quot;post_init_health: {}&quot;</span>, post_init_health);
<span class="comment">// Accounts that have negative init health may only take actions that don&#39;t further
// decrease their health.
// To avoid issues with rounding, we allow accounts to decrease their health by up to
// $1e-6. This is safe because the grace amount is way less than the cost of a transaction.
// And worst case, users can only use this to gradually drive their own account into
// liquidation.
// There is an exception for accounts with health between $0 and -$0.001 (-1000 native),
// because we don&#39;t want to allow empty accounts or accounts with extremely tiny deposits
// to immediately drive themselves into bankruptcy. (accounts with large deposits can also
// be in this health range, but it&#39;s really unlikely)
</span><span class="kw">let </span>health_does_not_decrease = <span class="kw">if </span>post_init_health &lt; -<span class="number">1000 </span>{
post_init_health.ceil() &gt;= pre_init_health.ceil()
} <span class="kw">else </span>{
post_init_health &gt;= pre_init_health
};
<span class="macro">require!</span>(
post_init_health &gt;= <span class="number">0 </span>|| post_init_health &gt; pre_init_health,
post_init_health &gt;= <span class="number">0 </span>|| health_does_not_decrease,
MangoError::HealthMustBePositiveOrIncrease
);
<span class="prelude-val">Ok</span>(())

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long