avatarFelipe Angelucci

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

949

Abstract

fix</pre></div><p id="8b9e">It will add underscore in front of variable a:</p><div id="39a9"><pre><span class="hljs-function">fn <span class="hljs-title">main</span>()</span> { <span class="hljs-keyword">let</span> _a = <span class="hljs-number">10</span>; }</pre></div><p id="7e4e">3 Clippy:</p><p id="9809">We can use it to catch common mistakes and improve your Rust code.</p><p id="1e04">To install clippy , by running:</p><div id="bb1c"><pre>rustup component <span class="hljs-keyword">add</span> clippy</pre></div><p id="3a18">Like we want to use PI value,</p><div id="7232"><pre><span class="hljs-function">fn <span class="hljs-title">main</span>()</span> { <span class="hljs-keyword">let</span> a = <span class="hljs-number">3.14</span>; <span class="hljs-keyword">let</span> b = <span class="hljs-number">2.0</span>; println!(<span class="hljs-string">"{}"</span>, a * b); }</pre></div><p id="d264">We run :</p><div id="58e4

Options

"><pre>cargo clippy</pre></div><p id="d654">It will tell us to use PI defined in standard library for more precise.</p><p id="f193">So we can change our code to :</p><div id="b409"><pre><span class="hljs-keyword">use</span> std::<span class="hljs-type">f32</span>::consts::PI;

<span class="hljs-keyword">fn</span> <span class="hljs-title function_">main</span>() { <span class="hljs-keyword">let</span> <span class="hljs-variable">a</span> = PI; <span class="hljs-keyword">let</span> <span class="hljs-variable">b</span> = <span class="hljs-number">2.0</span>; <span class="hljs-built_in">println!</span>(<span class="hljs-string">"{}"</span>, a * b); }</pre></div><p id="416f">4 rust-analyzer</p><p id="a872">It’s an extension, we can install it by searching rust-analyzer in extensions in vs code. It will make vs code gain abilities such as type definition, code completion, syntax highlighting and inline errors.</p></article></body>

STOCK MARKET INVESTING NEWS | ILLUMINATION

S&P 500 Reaches $5000 for the First Time in History

Will the S&P 500 reach any higher all-time highs in the stock market? Or is there a grim future ahead?

Photo by Robb Miller on Unsplash

On February 9th, 2024, the S&P 500 reached a new milestone of over $5,000. At 9:30 AM, it opened at $5,004.40. When the stock market closed at 4:00 PM, the S&P 500 was at $5026.61.

For the first time in the history of the stock market, the S&P 500 passed the $5000 mark. Most investors are excited by this new milestone that the S&P 500 crossed and hope that it continues growing to new all-time highs.

Screenshot of S&P 500 by Author.

Despite the economy slowing down in growth because of the hiked interest rates by the Federal Reserve, the S&P 500 and most other stocks in the stock market continue to rise in price to new all-time highs.

According to Adam Turnquist, chief technical strategist at LPL Financial, “a close above this closely watched level will undoubtedly create headlines and further feed fear of missing out (FOMO) emotions.”

Even though it’s the worst time to invest in the S&P 500 now because it’s at the highest it’s ever been, many beginner investors might think that it’s a good time since it’s growing to new all-time highs.

Photo by Yiorgos Ntrahas on Unsplash

The problem is that almost always the stock market corrects itself, and stocks fall back down to around what they’re actually worth. Not only that, but after such volatile growth, there’s typically a volatile decrease in the price of stocks because investors sell their shares for a profit.

It’s hard to tell if the S&P 500 will reach any new milestones in 2024, but it’s expected that the stock will eventually decrease in value and fall below the $5000 mark, so the stock market stabilizes as a whole and isn’t always growing in value.

If you found this story informative and want to continue being informed about business, investing, finance, and other topics, I highly appreciate your support already, and if you want to continue reading these stories from me, you can subscribe to my page for free on Medium.

You may also be interested in reading:

Business
Stock Market
Investing
Finance
Money
Recommended from ReadMedium