Skip to content

Commit

Permalink
fix title
Browse files Browse the repository at this point in the history
  • Loading branch information
sivukhin committed Jan 14, 2024
1 parent c8f872d commit 10451fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion find-slice-element-position-in-rust.dj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{date="2024/01/13"}
# Find slice element position in Rust
# Find slice element position in Rust, fast!

I started to learn `Rust` only recently and while exploring [slice methods][] I was a bit surprised that I didn't find any method for finding the position of element in the slice:

Expand Down
6 changes: 3 additions & 3 deletions find-slice-element-position-in-rust.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<meta name="author" content="Nikita Sivukhin"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Find slice element position in Rust</title>
<title>Find slice element position in Rust, fast!</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
Expand All @@ -15,8 +15,8 @@ <h2><a href="/">naming is hard</a></h2>
</header>
</div>
<div class="article">
<section id="Find-slice-element-position-in-Rust">
<h1 date="2024/01/13">Find slice element position in Rust</h1>
<section id="Find-slice-element-position-in-Rust-fast">
<h1 date="2024/01/13">Find slice element position in Rust, fast!</h1>
<p>I started to learn <code>Rust</code> only recently and while exploring <a href="https://doc.rust-lang.org/std/primitive.slice.html">slice methods</a> I was a bit surprised that I didn&rsquo;t find any method for finding the position of element in the slice:</p>
<pre class="noline"><code><span class="keyword">fn</span> <span class="function">find</span>(<span class="identifier">haystack</span>: &[<span class="identifier">u8</span>], <span class="identifier">needle</span>: <span class="identifier">u8</span>) -> <span class="identifier">Option</span><<span class="identifier">usize</span>> { ... }</code>
</pre>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2><a href="about.html">about</a></h2>
<ul>


<li><a href="find-slice-element-position-in-rust.html">2024/01/13: Find slice element position in Rust</a></li>
<li><a href="find-slice-element-position-in-rust.html">2024/01/13: Find slice element position in Rust, fast!</a></li>



Expand Down
2 changes: 1 addition & 1 deletion index_all.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2><a href="about.html">about</a></h2>
<div class="list">
<ul>

<li><a href="find-slice-element-position-in-rust.html">2024/01/13: Find slice element position in Rust</a></li>
<li><a href="find-slice-element-position-in-rust.html">2024/01/13: Find slice element position in Rust, fast!</a></li>

<li><a href="golang-errors-are-bad.html">2023/12/24: Death by a thousand error checks</a></li>

Expand Down

0 comments on commit 10451fe

Please sign in to comment.