Fix boxes a bit

This commit is contained in:
Carol (Nichols || Goulding) 2022-09-09 19:46:05 -04:00 committed by Carol (Nichols || Goulding)
parent ecbe0c4ebc
commit 5761b4b39a
2 changed files with 20 additions and 8 deletions

View File

@ -375,7 +375,7 @@ When youre compiling in debug mode, Rust includes checks for integer overflow
that cause your program to *panic* at runtime if this behavior occurs. Rust
uses the term *panicking* when a program exits with an error; well discuss
panics in more depth in “Unrecoverable Errors with panic!” on page XX.
>
> When youre compiling in release mode with the `--release` flag, Rust does
*not* include checks for integer overflow that cause panics. Instead, if
overflow occurs, Rust performs *twos complement wrapping*. In short, values
@ -384,17 +384,17 @@ of the values the type can hold. In the case of a `u8`, the value 256 becomes
0, the value 257 becomes 1, and so on. The program wont panic, but the
variable will have a value that probably isnt what you were expecting it to
have. Relying on integer overflows wrapping behavior is considered an error.
>
> To explicitly handle the possibility of overflow, you can use these families
of methods provided by the standard library for primitive numeric types:
>
> * Wrap in all modes with the `wrapping_*` methods, such as `wrapping_add`.
> * Return the `None` value if there is overflow with the `checked_*` methods.
> * Return the value and a boolean indicating whether there was overflow with
the `overflowing_*` methods.
> * Saturate at the values minimum or maximum values with the `saturating_*`
methods.
>
#### Floating-Point Types
Rust also has two primitive types for *floating-point numbers*, which are

View File

@ -101,9 +101,14 @@
<xsl:text>> * </xsl:text>
<xsl:apply-templates select="*" />
<xsl:text>&#10;</xsl:text>
<xsl:if test="not(following-sibling::*[1][self::w:p]) or following-sibling::w:p[1][w:pPr/w:pStyle[@w:val != 'BoxListBullet']]">
<xsl:text>>&#10;</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="following-sibling::w:p[1][w:pPr/w:pStyle[@w:val = 'BoxBody']]">
<xsl:text>>&#10;</xsl:text>
</xsl:when>
<xsl:when test="not(following-sibling::*[1][self::w:p])">
<xsl:text>&#10;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="w:p[w:pPr/w:pStyle[@w:val = 'BulletC' or @w:val = 'ListPlainC']]">
@ -199,7 +204,14 @@
<xsl:template match="w:p[w:pPr/w:pStyle[@w:val = 'BlockText' or @w:val = 'BoxBody']]">
<xsl:text>> </xsl:text>
<xsl:apply-templates select="*" />
<xsl:text>&#10;&#10;</xsl:text>
<xsl:choose>
<xsl:when test="following-sibling::w:p[1][w:pPr/w:pStyle/@w:val = 'BlockText' or w:pPr/w:pStyle/@w:val = 'BoxBody' or w:pPr/w:pStyle/@w:val = 'BoxListBullet']">
<xsl:text>&#10;>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="w:p[w:pPr/w:pStyle/@w:val = 'Note']">