Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Last active April 16, 2019 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshuawuyts/eddf761c9d85d085f84ef7d7cdba1b6c to your computer and use it in GitHub Desktop.
Save yoshuawuyts/eddf761c9d85d085f84ef7d7cdba1b6c to your computer and use it in GitHub Desktop.
#!/bin/bash
set +ex
fr() {
rg -l "$1" | xargs sed -i "s/$1/$2/g"
}
# setup
fr 'atomic_waker' 'atomic_cx'
# main code
fr 'waker' 'cx'
fr 'cx\.wake' 'cx\.waker\(\)\.wake'
fr 'Waker, Poll' 'Context, Poll'
fr 'Poll, Waker' 'Context, Poll'
fr '\&Waker' "\&mut Context<'_>"
fr '\&cx' 'cx'
fr ' w: ' ' cx: '
# restore
fr 'atomic_cx' 'atomic_waker'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment