<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in windows</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>28e6ae29 - Run `cargo fmt` from the workspace root</title>
        <link>http://172.16.0.5:8080/history/rust-libc-0.2.174/src/windows/#28e6ae29</link>
        <description>Run `cargo fmt` from the workspace root(backport &lt;https://github.com/rust-lang/libc/pull/4454&gt;)(cherry picked from commit adcb2b8258ab3b2f21678724f342e84fb28dff3e)

            List of files:
            /rust-libc-0.2.174/src/windows/mod.rs</description>
        <pubDate>Tue, 13 May 2025 21:00:00 +0000</pubDate>
        <dc:creator>Trevor Gross &lt;tmgross@umich.edu&gt;</dc:creator>
    </item>
<item>
        <title>108310db - Make use of the crate&apos;s prelude to replace individual imports</title>
        <link>http://172.16.0.5:8080/history/rust-libc-0.2.174/src/windows/#108310db</link>
        <description>Make use of the crate&apos;s prelude to replace individual importsAutomatically apply changes with the following:    #!/bin/bash    set -eux    files=()    # Types either defined in this crate or in `core`    prelude_types=(        c_char        c_double        c_float        c_int        c_longlong        c_long        c_short        c_uchar        c_uint        c_ulonglong        c_ulong        c_ushort        c_void        intptr_t        size_t        ssize_t        Clone        Copy        Option        Send        Sync    )    # Reexports from core    prelude_modules=(        fmt        hash        iter        mem    )    # Everything in the prelude    prelude=( &quot;${prelude_types[@]}&quot; &quot;${prelude_modules[@]}&quot; )    # Generate a list of all files excluding `lib.rs` (since the prelude being    # defined there makes string matching weird).    while IFS= read -r -d &apos;&apos; file; do        files+=(&quot;$file&quot;)    done &lt; &lt;(find src -name &apos;*.rs&apos; -not -name &apos;*lib.rs&apos; -not -name &apos;*macros.rs&apos; -not -name &apos;fixed_width_ints.rs&apos; -print0)    for file in &quot;${files[@]}&quot;; do        needs_prelude=0        # If the file already has some sort of glob import, skip it        if rg --pcre2 -q &apos;use (crate|super)::(?!prelude).*\*&apos; &quot;$file&quot;; then            continue        fi        # Core types always require the prelude to handle rustc-dep-of-std        if rg --pcre2 -q &apos;\b(?&lt;!\.)(Option|Clone|Copy|Send|Sync|fmt|hash|iter|mem)\b&apos; &quot;$file&quot;; then            needs_prelude=1        fi        # If we use any types that are specified in the prelude then we will import it        for ty in &quot;${prelude[@]}&quot;; do            # If the type is defined in the current module, we don&apos;t need it from the prelude            if rg -q &quot;type $ty =&quot; &quot;$file&quot;; then                continue            fi            if rg -qU &apos;((crate|super)::&apos;&quot;$ty&quot;&apos;|use (crate|super)::(\{\n){0,2}.*&apos;&quot;$ty)&quot; &quot;$file&quot;; then                needs_prelude=1            fi        done        # Check if the prelude is needed and does not already exist; if so, add it        if [ &quot;$needs_prelude&quot; = &quot;1&quot; ] &amp;&amp; ! rg -q &apos;use crate::prelude::\*&apos; &quot;$file&quot;; then            # Split the file into two parts: module-level attributes and rest            # Imports will be added after module-level attributes            attrs=$(awk &apos;/^#!|^\/\/!/ {found=NR} {lines[NR]=$0} END {for (i=1; i&lt;=found; i++) print lines[i]}&apos; &quot;$file&quot;)            rest=$(awk &apos;/^#!|^\/\/!/ {found=NR} END {if (found) {for (i=found+1; i&lt;=NR; i++) print lines[i]} else {for (i=1; i&lt;=NR; i++) print lines[i]}} {lines[NR]=$0}&apos; &quot;$file&quot;)            printf &quot;%s\n&quot; &quot;$attrs&quot; &gt; &quot;$file&quot;            printf &quot;\n%s\n\n&quot; &quot;use crate::prelude::*;&quot; &gt;&gt; &quot;$file&quot;            printf &quot;%s&quot; &quot;$rest&quot; &gt;&gt; &quot;$file&quot;        fi        for ty in &quot;${prelude[@]}&quot;; do            export TY=&quot;$ty&quot; # env for perl to use            # Remove simple imports `use crate::ty;`            perl -pi -0777 -e &apos;s/use ((crate|super)::)?($ENV{TY});//g&apos; &quot;$file&quot;            # Remove the type if it is part of a group import            perl -pi -0777 -e &apos;s/(use (crate|super)::\{?(.*|(\n.*){0,2}))\b$ENV{TY}\b,? ?/$1/g&apos; &quot;$file&quot;            # Replace pathed `crate::ty`            perl -pi -0777 -e &apos;s/(crate|super)::($ENV{TY})\b/$2/g&apos; &quot;$file&quot;        done        # For some reason, rustfmt doesn&apos;t trim leading newlines. Do so manually here.        perl -pi -0777 -e &apos;s/\A\n+//&apos; &quot;$file&quot;        rustfmt &quot;$file&quot;    done    ./ci/style.sh(backport &lt;https://github.com/rust-lang/libc/pull/4161&gt;)(cherry picked from commit f8a018a8e3efaf8cc4fbad84974255b0fa899fc2)Applied by rerunning the script rather than resolving conflictsmanually.

            List of files:
            /rust-libc-0.2.174/src/windows/gnu/mod.rs</description>
        <pubDate>Wed, 27 Nov 2024 22:00:00 +0000</pubDate>
        <dc:creator>Trevor Gross &lt;tmgross@umich.edu&gt;</dc:creator>
    </item>
</channel>
</rss>
