Fix Rust import path in integration docs
The Rust code panes used 'use licensing_client::...' but the crate is keysat-licensing-client (module keysat_licensing_client). Correct both panes so copy-pasted snippets compile.
This commit is contained in:
+2
-2
@@ -126,7 +126,7 @@ MCowBQYDK2VwAyEAmz7q8r4t1v…h3k2pXq9wL
|
|||||||
// carries the entitlements baked in at issue time.</span>
|
// carries the entitlements baked in at issue time.</span>
|
||||||
app.licensed = <span class="k">true</span>;
|
app.licensed = <span class="k">true</span>;
|
||||||
app.entitlements = license.payload.entitlements; <span class="c">// string[]</span></pre>
|
app.entitlements = license.payload.entitlements; <span class="c">// string[]</span></pre>
|
||||||
<pre class="code lang-pane" data-lang="rs" style="display:none"><span class="k">use</span> licensing_client::{<span class="f">Verifier</span>, <span class="f">PublicKeyPem</span>};
|
<pre class="code lang-pane" data-lang="rs" style="display:none"><span class="k">use</span> keysat_licensing_client::{<span class="f">Verifier</span>, <span class="f">PublicKeyPem</span>};
|
||||||
|
|
||||||
<span class="k">let</span> pk = <span class="f">PublicKeyPem</span>::from_str(ISSUER_PEM)<span class="p">?</span>;
|
<span class="k">let</span> pk = <span class="f">PublicKeyPem</span>::from_str(ISSUER_PEM)<span class="p">?</span>;
|
||||||
<span class="k">let</span> verifier = <span class="f">Verifier</span>::new(pk);
|
<span class="k">let</span> verifier = <span class="f">Verifier</span>::new(pk);
|
||||||
@@ -182,7 +182,7 @@ app.entitlements = license.payload.entitlements</pre>
|
|||||||
<span class="k">else</span> <span class="k">if</span> (e <span class="k">instanceof</span> <span class="f">LicensingError</span>) <span class="f">showInputError</span>();
|
<span class="k">else</span> <span class="k">if</span> (e <span class="k">instanceof</span> <span class="f">LicensingError</span>) <span class="f">showInputError</span>();
|
||||||
<span class="k">else</span> <span class="f">showGenericError</span>(e);
|
<span class="k">else</span> <span class="f">showGenericError</span>(e);
|
||||||
}</pre>
|
}</pre>
|
||||||
<pre class="code lang-pane" data-lang="rs" style="display:none"><span class="k">use</span> licensing_client::<span class="f">Error</span>;
|
<pre class="code lang-pane" data-lang="rs" style="display:none"><span class="k">use</span> keysat_licensing_client::<span class="f">Error</span>;
|
||||||
|
|
||||||
<span class="k">match</span> verifier.verify(&license_key) {
|
<span class="k">match</span> verifier.verify(&license_key) {
|
||||||
<span class="k">Ok</span>(license) => grant_access(&license),
|
<span class="k">Ok</span>(license) => grant_access(&license),
|
||||||
|
|||||||
Reference in New Issue
Block a user